docs: clarify the behavior of prepending hostname to metrics#17521
Merged
docs: clarify the behavior of prepending hostname to metrics#17521
Conversation
jjti
reviewed
Jun 5, 2023
Comment on lines
+1821
to
+1822
| This controls whether or not to prepend runtime telemetry of gauge type with the | ||
| machine's hostname, defaults to false (prepend hostname). |
Contributor
There was a problem hiding this comment.
Suggested change
| This controls whether or not to prepend runtime telemetry of gauge type with the | |
| machine's hostname, defaults to false (prepend hostname). | |
| If enabled this disables prepending the name of gauge type metrics with the | |
| machine's hostname. By default, hostname is prepended. |
Contributor
There was a problem hiding this comment.
possible rephrasing. I still find it a bit tricky to read as is. The section below is very helpful, though
Contributor
trujillo-adam
left a comment
There was a problem hiding this comment.
I added a suggestion that I think will make the setting clearer.
Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
Collaborator
Author
|
@trujillo-adam , any idea what may cause the failed CI job? |
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.
Description
The prepended name to the gauge metrics causes some confusion on how to query the metrics. According to the
go-metrics' godoc,EnableHostnameis only applicable to gauge metrics:Consul initializes the
metrics.configwith the agent configuration value “telemetry.disable_hostname”.consul/lib/telemetry.go
Lines 327 to 329 in 720dda7
Therefore, if
disable_hostnameisfalse, hostname will be added to gauge metric names (the default behavior); otherwise, no hostname will be prepended to the metrics name of gauge type. That said,disable_hostnamehas no impact on other types of metrics.This PR clarifies this behavior in consul's doc.
Links
fix #17320
PR Checklist