-
Notifications
You must be signed in to change notification settings - Fork 712
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
Expose probe metrics to Prometheus #3600
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.
Nice one! 👍
Two more comments:
- count of conntrack errors from instrument probes with some prometheus metrics #2318 - do we do that one already?
- It would be nice to update the docs somewhere to tell users they can change the flag to control get the exposed Prometheus metrics
cfg := &metrics.Config{ | ||
ServiceName: "scope-probe", | ||
TimerGranularity: time.Second, | ||
FilterDefault: true, // Don't filter metrics by default |
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 guess the comment here is a bit confusing as it reads as a negation of the code :)
metrics.MeasureSinceWithLabels([]string{"duration", "seconds"}, t, []metrics.Label{ | ||
{Name: "operation", Value: "ticker"}, | ||
{Name: "module", Value: ticker.Name()}, | ||
}) |
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.
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.
Maybe, but I'm just exposing what we already had. I can change "Fixes" to "fixes part of".
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 can change "Fixes" to "fixes part of".
Yeah, either that or adding the cases if it's a small enough change - your call!
Signed-off-by: Bryan Boreham <[email protected]>
We are already timing all report, tag and tick operations. If Prometheus is in use, expose those metrics that way. Adjust metrics naming to fit with Prometheus norms. The previous way these metrics were exposed was via SIGUSR1, and we can only have one "sink", so make it either-or. Signed-off-by: Bryan Boreham <[email protected]>
b547fff
to
5e57b0d
Compare
I added a few more metrics so I believe this can close #2318 now |
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! 👍
Thanks for the changes!
Fixes #2318
We are already timing all report, tag and tick operations via the armon/go-metrics library, added in #658. If Prometheus is in use, expose those metrics that way.
Adjust metrics naming to fit with Prometheus norms.
The previous way these metrics were exposed was via SIGUSR1, and we can only have one "sink", so make it either-or.
Example output: