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

fix: record previous value of sampler counter metrics so they report correctly #1281

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

kentquirk
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • Update the previous values
  • Fix a test that was sensitive to existing standard envvar

@kentquirk kentquirk requested a review from a team as a code owner August 15, 2024 19:41
Copy link
Contributor

@VinozzZ VinozzZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Is there a way to add test for the sampler to make sure we are not going to break it in the future?

@kentquirk
Copy link
Contributor Author

Well, I tried, but it ended up being an extremely picky, implementation-dependent test -- not only on the implementation of the sampler, but also the implementations of metrics AND MockMetrics. I didn't think it was worth it, so I left it off.

@kentquirk kentquirk merged commit e14617a into main Aug 19, 2024
5 checks passed
@kentquirk kentquirk deleted the kent.fix_sampler_counter_metrics branch August 19, 2024 14:26
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.

Counter-type metrics for samplers are broken
2 participants