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: enable custom histogram buckets #18

Merged
merged 8 commits into from
Apr 17, 2024
Merged

fix: enable custom histogram buckets #18

merged 8 commits into from
Apr 17, 2024

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented Apr 16, 2024

Description

Allow customizing the builder e.g. to set custom buckets. Example here. Slack conversation

How Has This Been Tested?

Tested in Notify Server.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@chris13524 chris13524 self-assigned this Apr 16, 2024
@chris13524 chris13524 changed the title fix: enable exponential histograms fix: enable custom histogram buckets Apr 17, 2024
crates/metrics/src/lib.rs Outdated Show resolved Hide resolved
crates/metrics/src/lib.rs Outdated Show resolved Hide resolved
crates/metrics/src/lib.rs Outdated Show resolved Hide resolved
@chris13524
Copy link
Member Author

Thanks for the suggestions @heilhead, I had just thrown this together with random names. These are better names!

let meter = provider.meter(service_name);

global::set_meter_provider(provider);
Copy link
Member Author

Choose a reason for hiding this comment

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

Enables general use of global:: stuff. Don't think we are using this right now, but it's a best practice

@chris13524 chris13524 merged commit ec50345 into main Apr 17, 2024
7 checks passed
@chris13524 chris13524 deleted the fix/histograms branch April 17, 2024 16:44
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