-
Notifications
You must be signed in to change notification settings - Fork 121
Histogram issue with time unit duration_seconds #106
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
Comments
I can confirm this behavior, had this problem when using a Histogram with a I think the intention of the authors is that clients use the macro But I also ran into the same issue by accident, which was somewhat hard to debug. From my point of view this is relevant when developers would like to have a little more control over the computation of the duration and don't want to use the provided macro. Intuitively, when using If this is an issue with prometheus.ex I'm happy to move the discussion there. |
It expects |
Why was this implemented this way? This design decision to change behaviour based on a metric name cost me many hours. |
This design decision and lack of clear documentation also cost me several hours. A more prominent call-out of this behavior or (better yet, at least in my opinion) a reconsideration of this design decision would maybe help usability a bit for new users. |
I don't know why it was made like this, but I'd be happy to merge a PR updating the documentation. Just ping me on the PR. |
When I declare a histogram metric with a name that ends in duration_seconds, for example request_time_duration_seconds, and then use promethues_histogram:observe(request_time_duration_seconds, 30), I would expect this to be recorded as 30 seconds. But when I see the data recorded in the buckets, it is totally off. It seems to record this as 30 nano seconds. Is this a bug or am I missing something ?
The text was updated successfully, but these errors were encountered: