-
Notifications
You must be signed in to change notification settings - Fork 3.1k
add exemplars support to prometheusremotewriteexporter #5578
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 exemplars support to prometheusremotewriteexporter #5578
Conversation
Signed-off-by: Anne-Elisabeth Lelievre <[email protected]>
Signed-off-by: Anne-Elisabeth Lelievre <[email protected]>
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@codeboten I think this PR is ready for review |
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.
infLabels := createAttributes(resource, pt.Attributes(), externalLabels, nameStr, baseName+bucketStr, leStr, pInfStr) | ||
addSample(tsMap, infBucket, infLabels, metric) | ||
|
||
promExemplar := getPromExemplar(pt, len(pt.BucketCounts())-1) |
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.
Can you clarify where len(pt.BucketCounts())-1
comes from? I could be misunderstanding it, but my reading of the proto doesn't indicate any relationship between bucket counts and exemplars
Shouldn't we just go through all the exemplars, convert them and add them all?
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.
@anuraaga according to my understanding, the len(pt.BucketCounts())-1 seems to be the index for the +inf bucket. For me, from what I read, it seems to exists a relationship between the bucket index and the exemplars with the support in prometheus:
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.
Thanks for clarifying! Can you add a comment referencing that we need to use the +inf bucket?
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.
yes of course! done
Signed-off-by: Anne-Elisabeth Lelièvre <[email protected]>
Signed-off-by: Anne-Elisabeth Lelievre <[email protected]>
Signed-off-by: Anne-Elisabeth Lelièvre <[email protected]>
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.
Thanks for addressing my comments, @anuraaga please review and approve if your comments have been addressed.
Signed-off-by: Anne-Elisabeth Lelievre [email protected]
Hello, this is the implementation of #5192 to support exemplars for the prometheus remote write exporter.
Thanks