logs: label 'target' cannot be used at it is already defined by default. Renaming it in 'name'#1519
Open
wat-org wants to merge 1 commit intoprometheus:masterfrom
Open
logs: label 'target' cannot be used at it is already defined by default. Renaming it in 'name'#1519wat-org wants to merge 1 commit intoprometheus:masterfrom
wat-org wants to merge 1 commit intoprometheus:masterfrom
Conversation
…t. renaming it in 'name' Signed-off-by: guillaume.cornet <cornet.guillaume.pierre@gmail.com>
Contributor Author
| hello @electron0zero |
Contributor Author
| hello @SuperQ |
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 / Which issue(s) does the PR fix:
The prober logger contains by default a label 'module' and a label 'target', which contains contextual information related to the current module/target.
Some logs related to dns explicitly specifies a label 'target', and consequently overrides the content of the default label 'target' and make log correlation difficult.
The aim of this PR if to fix this: using another label name, the label 'target' will have a consistant value and simplify log correlation.
example
before the fix:
->
the logs generated by the prober have target=https://www.example.com/api/health
the logs produced by utils.go have target=www.example.com
->
label target is not consistant.
it is hard to correlate logs.
after the fix:
->
the logs generated by the prober have target=https://www.example.com/api/health
the logs produced by utils.go have target=https://www.example.com/api/health (and name=www.example.com)
->
label target is consistant.
it is simple to correlate logs.
Does this PR introduce a user-facing change?
not at all
Checklist
release-notessection of PR Desc. (N/A)