router
router copied to clipboard
Setting RUST_LOG=error does not displays some metrics
Describe the bug Setting RUST_LOG=error does not displays some metrics
To Reproduce Steps to reproduce the behavior:
Run following command from router/examples/telemetry to reproduce the behavior:
RUST_LOG=error cargo run -- -s ../graphql/supergraph.graphql -c otlp.router.yaml
when setting RUST_LOG=error
when setting RUST_LOG=info
This is most likely due to the Metric's layer which uses tracing events for metrics. If the EnvFilter does not enable the event the metrics layer won't see it.
Hi @xuorig , in our case we want to see all the metrics exposed in the prometheus route irrespective of the log level set. Is there a way to achieve this? Because logs can get pretty chatty, and we'd still want to be able to monitor the health and these metrics for router.
We now have new macros to generate metrics and it won't be affected by the log level anymore. We have to migrate all our current metrics to that new mechanism