-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 _created support: add createdTime() method to counter #1044
Conversation
Signed-off-by: Pengfei Zhang <zhangpengfei@google.com>
@beorn7 Please take a look since you are the original owner of that issue. |
While I opened this issue, this has to be figured out between the OpenMetrics experts and the current maintainers of prometheus/client_golang. From a very general perspective, I don't think |
Signed-off-by: Pengfei Zhang <zhangpengfei@google.com>
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.
We haven't discussed OpenMetrics support among maintainers yet. cc @bwplotka
I'll add this to the milestone. And ask for your further patience for the decision.
Hello, Is this still being discussed? |
Can we please do this? |
I will check-in with maintainers about this again. |
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.
Hi,
Thanks for this. We decided on Prometheus DevSummit to pursue proto version of OpenMetrics format as the main one. So I would implement that first.
For OM v1.0 text format, there are many weird conflicts and incompatibilities (e.g spam of extra metric on all Prometheus versions), so we can't really support it in client_golang and definitely not by default. I would suggest waiting on text improvement for OM e.g in OM 2.0 and rely on proto only.
WDYT?
valInt uint64 | ||
valBits uint64 | ||
valInt uint64 | ||
createdTime uint64 |
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 don't think this field is ever used, no?
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.
It's initialized on L166 in initCreated()
call.
Presumably, a forthcoming change would use it for serving in a Prometheus counter metric.
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.
Yup, but we would need this to be either in this PR ideally so we see how end solution would look like 🤗
Definitely it's good direction!
BTW, @ArthurSens, our mentee works on adding created timestamp with tests #1044 |
Done in #1044, so closing this PR. Thanks anyway! |
I believe he meant #1313 |
first step of issue #685
Signed-off-by: Pengfei Zhang zhangpengfei@google.com