-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] validate if scope is already present #36927
base: main
Are you sure you want to change the base?
Conversation
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.
Good start! We're only missing a test and don't forget to add datapoints for the case where scopemetrics already exist!
scopeExists = true | ||
break |
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 also want to add datapoints in this case, but for the existing scope
scopeExists = true | |
break | |
scopeExists = true | |
addDatapoints(scope.Metrics.AppendEmpty().SetEmptyGauge().Datapoints(), ls, ts) | |
break |
We're using Metrics.AppendEmpty()
due to the first TODO in this function, in a follow up PR we'll cache metric type/unit/name and use that to decide if we append empty metrics or use an already existing one :)
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.
Do you think that I need to add this detail in 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.
Nah, the already existing TODO is enough :)
Co-authored-by: Arthur Silva Sens <[email protected]>
Description
Continuing the work done in this PR, addressing a TODO.