-
Notifications
You must be signed in to change notification settings - Fork 656
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
Creating Exponential Histograms #4383
Labels
bug
Something isn't working
Comments
Does the upload not work?
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe your environment
OS: macOS Sonoma
Python version: Python 3.13.1
Versions:
opentelemetry-api==1.29.0
opentelemetry-distro==0.50b0
opentelemetry-exporter-otlp==1.29.0
opentelemetry-exporter-otlp-proto-common==1.29.0
opentelemetry-exporter-otlp-proto-grpc==1.29.0
opentelemetry-exporter-otlp-proto-http==1.29.0
opentelemetry-instrumentation==0.50b0
opentelemetry-proto==1.29.0
opentelemetry-sdk==1.29.0
opentelemetry-semantic-conventions==0.50b0
What happened?
When I want to have exponential Histograms I can use the environment variable to make them the default like this:
But if I want to make exponential histograms the default in code it looks like the correct way is to make a View that matches the histogram instrument to set the aggregation policy. I've tried something like this:
However, the last approach produces an ExplicitBounds histogram using the default bucket boundaries every time. I've tried using this to set an ExplicitBucketHistogramAggregation with custom buckets....but my custom buckets are ignored.
Looking at
get_meter()
I'm concerned that it doesn't give the instruments access to the defined views and therefor just ignores any global views I try to configure.https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py#L555
Am I setting this up incorrectly, or is this a bug?
Steps to Reproduce
Uploading init_metrics.py.txt…
Expected Result
I should see my local OTEL Collector in debug mode dump out exponential buckets,
Actual Result
Unless I use the environment variable I always get Explicit Buckets with the default bucketing.
Additional context
I'm attempting to build some examples and boiler plate for custom metrics for my teams.
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: