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

Handle empty result for Prometheus correctly #1

Open
pixelistik opened this issue May 9, 2017 · 1 comment
Open

Handle empty result for Prometheus correctly #1

pixelistik opened this issue May 9, 2017 · 1 comment

Comments

@pixelistik
Copy link
Owner

Steps to reproduce

Run with a time filter that returns no requests

 cargo run -- -t 1 --prometheus-listen localhost:9898 src/test/random.log

Query the Prometheus endpoint

curl localhost:9898

Result

Panic! Due to an unwrap()...

Expected

Send count=0 and NaN for all other metrics. https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics

@pixelistik
Copy link
Owner Author

Panic has been fixed with abe1fe9

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

No branches or pull requests

1 participant