You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for custom and standard instruments through the
configuration file. You'll be able to add your own custom metrics just
using the configuration file. It can be conditional, get values from
selectors like headers, context, body. And the metrics can have
different types like `histogram` or `counter`.
Example:
```yaml title="router.yaml"
telemetry:
instrumentation:
instruments:
router:
http.server.active_requests: true
acme.request.duration:
value: duration
type: counter
unit: kb
description: "my description"
attributes:
http.response.status_code: true
"my_attribute":
response_header: "x-my-header"
supergraph:
acme.graphql.requests:
value: unit
type: counter
unit: count
description: "supergraph requests"
subgraph:
acme.graphql.subgraph.errors:
value: unit
type: counter
unit: count
description: "my description"
```
[Documentation](https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/instruments)
Fixes#4319
---------
Signed-off-by: Benjamin Coenen <[email protected]>
Implement custom instruments defined by yaml as documented in:
https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/instruments
This will allow users to avoid reaching for a custom plugin when they need to collect metrics for when things happen/
The text was updated successfully, but these errors were encountered: