Skip to content
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

feat: Add metrics counter retrieval #65

Merged
merged 2 commits into from
Jun 6, 2023
Merged

feat: Add metrics counter retrieval #65

merged 2 commits into from
Jun 6, 2023

Conversation

kentquirk
Copy link
Contributor

Which problem is this PR solving?

To date, the samplers have had no way of getting any metrics from them, which has sometimes made it hard to support. This adds a simple GetMetrics call that retrieves a map of named metrics on request.

GetMetrics returns a map of metrics about the sampler's performance. All values are returned as int64; counters are cumulative and the names always end with "_count", while gauges are instantaneous with no particular naming convention. All names are prefixed with the string passed in.

Short description of the changes

  • Add GetMetrics function to Sampler interface and all samplers

avgsamplerate.go Outdated Show resolved Hide resolved
@kentquirk kentquirk merged commit edb5cae into main Jun 6, 2023
@kentquirk kentquirk deleted the kent.add_getmetrics branch June 6, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants