-
Notifications
You must be signed in to change notification settings - Fork 378
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
Add response histograms to apache_metrics example. #46
Conversation
counter apache_http_received_bytes_total by server_port, handler, request_method, request_status, request_protocol | ||
counter apache_http_request_time_microseconds by quantile, server_port, handler, request_method, request_status, request_protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"quantile" doesn't seem like the right term here. It's the boundary of the latency bucket we are talking about here. So "bucket" or "upper_bound" or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just using the labeling used by other similar metrics. This should result in normal Prometheus-style cumulative histogram labeling.
10x buckets are really coarse. Check out our default buckets for a "network service": https://github.com/prometheus/client_golang/blob/master/prometheus/histogram.go#L54-L59 Even those are pretty coarse, and only meant as a starting point before you manually tailor the buckets and zoom into the area you are interested in. |
This is an example file, I didn't want to get overly granular, but just provided a starting point example for "normal" apache servers. But I can adjust them. Part of the problem is apache servers sometimes also handle very long-lived requests. |
@beorn7 |
OK, so the labels should be fine now, but it would be good to see an example output. WRT bucket scheme: Especially because it is an example and because Apache may server very long running queries, I'd use the same bucketing as in https://github.com/prometheus/client_golang/blob/master/prometheus/histogram.go#L54-L59 . The buckets there were laid out under the exact same premises. Some monitoring systems use 4x buckets, and that's already mostly useless. 10x is really not a good role model, so it shouldn't be used in an example. |
1 similar comment
Use the standard recommended network service buckets[0]. [0]: https://github.com/prometheus/client_golang/blob/master/prometheus/histogram.go#L54-L59
@beorn7 Ok, I've updated the buckets to follow the recommended defaults. |
1 similar comment
Thanks. Could you attach a sample output to this PR so that we can check the final outcome? |
Thanks! |
Sorry, microseconds is the only reasonably compatible time until mtail supports floats metrics.
CC @beorn7