-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[chore] prom translation rw2 add support for target_info #40493
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?
[chore] prom translation rw2 add support for target_info #40493
Conversation
Review please @dashpole @ArthurSens @ywwg @krajorama |
Co-authored-by: David Ashpole <[email protected]>
similar to #40494, this is feat, not a chore |
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.
initial questions
// convert ns to ms | ||
Timestamp: convertTimeStamp(timestamp), | ||
} | ||
converter.addSample(sample, labels, metadata{ |
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.
is there a reason this is a pure function with the converter as a parameter instead of making this just a member of converter? I think that would make the function calls more clear:
c.AddResourceTargetInfoV2(resource, settings, mostRecentTimestamp)
name := prometheustranslator.TargetInfoMetricName | ||
if len(settings.Namespace) > 0 { | ||
// TODO what to do with this in case of full utf-8 support? | ||
name = settings.Namespace + "_" + name |
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 have functions like "BuildCompliantMetricName" that take care of this
Description
Adds support for adding target_info in the RW2 translation path.
Link to tracking issue
Fixes
Partially implements #33661 (when merging PR please don't close the tracing issue)
Testing
Target_info in prometheus.
