Change label name for metrics generator instance#1439
Merged
joe-elliott merged 4 commits intografana:mainfrom May 23, 2022
Merged
Change label name for metrics generator instance#1439joe-elliott merged 4 commits intografana:mainfrom
joe-elliott merged 4 commits intografana:mainfrom
Conversation
Signed-off-by: Joe Elliott <number101010@gmail.com>
yvrhdn
approved these changes
May 23, 2022
Contributor
yvrhdn
left a comment
There was a problem hiding this comment.
Back when I added the instance label I was trying to figure out what would be most appropriate. The only guidance I found about this was:
Label names may contain ASCII letters, numbers, as well as underscores. They must match the regex
[a-zA-Z_][a-zA-Z0-9_]*. Label names beginning with __ are reserved for internal use.
https://prometheus.io/docs/concepts/data_model/
So this technically isn't allowed, but tbh I think this document is mostly aimed towards clients that are scraped by Prometheus?
An internal label conflicting with __metrics_gen_instance seems very unlikely.
Co-authored-by: Koenraad Verheyden <koenraad.verheyden@posteo.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
The metrics generators add an
instancelabel to distinguish between metrics series. This prevents out of order issues with remote write. Unfortunatelyinstanceis a very common label name and may conflict with custom dimensions on service graphs or span metrics.This PR proposes a much more unique label name that is far less likely to conflict
__metrics_gen_instance. Feel free to suggest other options if desired.Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]