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

Configure histogram flavor/max buckets per meter #5974

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shakuzen
Copy link
Member

@shakuzen shakuzen commented Feb 26, 2025

Adds new configuration methods to override the registry-wide configuration at a per Meter (name) level. This gives more fine-grain control of the configuration.

The registry-wide HistogramFlavor configuration can be overridden at the meter level with the new histogramFlavorPerMeter configuration method, which returns a Map<String, HistogramFlavor> where the key is the exact Meter name to match.

Likewise, the registry-wide max bucket count can be overridden at the meter level with the new maxBucketsPerMeter configuration method, which returns a Map<String, Integer> where the key is the exact Meter name to match.

TODO: Update documentation

Closes #5459

Adds new configuration methods to override the registry-wide configuration at a per Meter (name) level. This gives more fine-grain control of the configuration.
@@ -264,4 +292,14 @@ default TimeUnit baseTimeUnit() {
return getTimeUnit(this, "baseTimeUnit").orElse(TimeUnit.MILLISECONDS);
}

static <V> Map<String, V> propertiesStringToMap(String propertiesString,
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like that this is a public method. We should probably move it somewhere internal instead.

@shakuzen
Copy link
Member Author

Pinging some folks who expressed interest in or provided input on this feature before to get any feedback they may have on this proposal: @lenin-jaganathan @pirgeo @sfc-gh-rscott @sfc-gh-dguy. Of course anyone else is welcome to give feedback too.

In #5459 I expressed a desire to expose the configuration at the DistributionStatisticConfig level. In this proposal (at the time of writing this comment), I've abandoned that and went for what feels more straightforward: making the configuration specific to OtlpConfig and the OtlpMeterRegistry. If anyone has thoughts on that, please share.

@shakuzen
Copy link
Member Author

shakuzen commented Mar 6, 2025

We have the last 1.15 milestone release on Monday, so I'd like to merge something for this in time for that. If anyone has feedback on the proposal, please share.

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.

Support configuring exponential histograms at the meter level
1 participant