-
Notifications
You must be signed in to change notification settings - Fork 4.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
docs: clarify the behavior of prepending hostname to metrics #17521
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.
LGTM 👍
This controls whether or not to prepend runtime telemetry of gauge type with the | ||
machine's hostname, defaults to false (prepend hostname). |
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.
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. |
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.
possible rephrasing. I still find it a bit tricky to read as is. The section below is very helpful, though
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 added a suggestion that I think will make the setting clearer.
Co-authored-by: trujillo-adam <[email protected]>
@trujillo-adam , any idea what may cause the failed CI job? https://github.com/hashicorp/consul/actions/runs/5182923956/jobs/9340224933?pr=17521 |
Description
The prepended name to the gauge metrics causes some confusion on how to query the metrics. According to the
go-metrics
' godoc,EnableHostname
is only applicable to gauge metrics:Consul initializes the
metrics.config
with the agent configuration value “telemetry.disable_hostname”.consul/lib/telemetry.go
Lines 327 to 329 in 720dda7
Therefore, if
disable_hostname
isfalse
, 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_hostname
has no impact on other types of metrics.This PR clarifies this behavior in consul's doc.
Links
fix #17320
PR Checklist