request_log_analyzer icon indicating copy to clipboard operation
request_log_analyzer copied to clipboard

Handle empty result for Prometheus correctly

Open pixelistik opened this issue 8 years ago • 1 comments

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 avatar May 09 '17 18:05 pixelistik

Panic has been fixed with abe1fe9012c080a7d51a2387602434cdcd25addf

pixelistik avatar May 12 '17 23:05 pixelistik