Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting RUST_LOG=error does not displays some metrics #4965

Open
manaljain6667 opened this issue Apr 16, 2024 · 3 comments
Open

Setting RUST_LOG=error does not displays some metrics #4965

manaljain6667 opened this issue Apr 16, 2024 · 3 comments

Comments

@manaljain6667
Copy link

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
Screenshot 2024-04-10 at 2 46 09 PM

when setting RUST_LOG=info
Screenshot 2024-04-10 at 2 45 01 PM

@xuorig
Copy link
Contributor

xuorig commented Apr 17, 2024

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.

@harshitkumar31
Copy link

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.

@bnjjj
Copy link
Contributor

bnjjj commented Apr 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants