-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[receiver/prometheusremotewrite] skip emitting empty metrics #44149
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
[receiver/prometheusremotewrite] skip emitting empty metrics #44149
Conversation
ArthurSens
left a comment
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 wouldn't say it's "Chore" though. We're changing behavior here. Could you add a changlog entry?
|
@ArthurSens I've added a change log. |
|
Hmmm, weird. The diff with |
…lemetry#44149) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description We should ideally empty a metric only if it has some datapoints in it. Right now, we can emit empty metric if the `target_info` arrives first and normal metrics arrives in subsequent request. This PR adds a simple check to skip `ConsumeMetrics` if metric count is 0. <!--Describe what testing was performed and which tests were added.--> #### Testing Updated tests --------- Co-authored-by: Yang Song <[email protected]>
Description
We should ideally empty a metric only if it has some datapoints in it. Right now, we can emit empty metric if the
target_infoarrives first and normal metrics arrives in subsequent request.This PR adds a simple check to skip
ConsumeMetricsif metric count is 0.Testing
Updated tests