-
Notifications
You must be signed in to change notification settings - Fork 690
feat: add possibility to define custom attributes for runtime metrics #7974
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
base: main
Are you sure you want to change the base?
feat: add possibility to define custom attributes for runtime metrics #7974
Conversation
|
Couldn't you do the same with resources, and possibly views? |
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.
Resource attributes are the proper place for this information
Views can only filter attributes. We do have a labeler concept in otelhttp that is similar, but I don't think that applies to runtime metrics |
So, i tried to use resources but attributes from resources published only at metadata metrics. The prometheus exporter has a good visualization for this. Look at these metrics please:
When i need to get the
But by first hand this query looks more difficult than just So, if i wrong, explain me please how it should works |
That is basically correct.
|
Okay, then all exported metrics (runtime too) should contain job/instance attributes to be matched with |
Oh, i see...
|
|
Thank you for help! How do you think may this PR be useful for other cases? |
Hello, this PR add support for user defined metric attributes to runtime metrics (
instruments/runtime
package).For example:
On latest release runtime metrics look somehow like this:
go_memory_used_bytes{go_memory_type="other"} 1.4046472e+07
On this PR you can enrich metrics by some attributes like this:
go_memory_used_bytes{environment="local", host="localhost", go_memory_type="other"} 1.4046472e+07