-
Notifications
You must be signed in to change notification settings - Fork 512
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
docs: adds instructions for collecting and sending native histograms with otel collector #9328
base: main
Are you sure you want to change the base?
Conversation
…with otel collector
Use the OpenTelemetry SDK version 1.35.0 or later. | ||
|
||
1. Set up the collector to handle your metrics data. This includes setting up your resources, meter provider, meter, instruments, and views. Refer to [Metrics](https://opentelemetry.io/docs/languages/java/instrumentation/#metrics) in the OpenTelemetry SDK documentation for Java. | ||
1. To aggregate a histogram instrument as an exponential histogram, include the following view: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krajorama could you please provide an example implementation for Java? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to set it up, but I don't have enough Java experience at this point to get it to work, I suggest we stick to Go for now. Maybe someone can contribute the Java parts once we have the structure and everything figured out for Go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! I'll make the docs Go-specific for the time being.
Use the OpenTelemetry SDK version 1.35.0 or later. | ||
|
||
1. Set up the collector to handle your metrics data. This includes setting up your resources, meter provider, meter, instruments, and views. Refer to [Metrics](https://opentelemetry.io/docs/languages/java/instrumentation/#metrics) in the OpenTelemetry SDK documentation for Java. | ||
1. To aggregate a histogram instrument as an exponential histogram, include the following view: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to set it up, but I don't have enough Java experience at this point to get it to work, I suggest we stick to Go for now. Maybe someone can contribute the Java parts once we have the structure and everything figured out for Go.
Co-authored-by: George Krajcsovits <[email protected]>
Co-authored-by: George Krajcsovits <[email protected]>
Co-authored-by: George Krajcsovits <[email protected]>
Co-authored-by: George Krajcsovits <[email protected]>
} | ||
``` | ||
|
||
For more information, refer to [Registering Views](https://opentelemetry.io/docs/languages/go/instrumentation/#registering-views) in the OpenTelemetry SDK documentation for Go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering whether we should add a link regarding the parameter settings: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#base2-exponential-bucket-histogram-aggregation
|
||
# Send exponential histograms to Mimir | ||
|
||
You can collect and send exponential histograms to Mimir with the OpenTelemetry Collector. OpenTelemetry [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) are compatible with Prometheus native histograms. The key difference is that exponential histograms store the `min` and `max` observation values explicitly, whereas native histograms don't. This means that for exponential histograms, you don't need to estimate these values using the 0.0 and 1.0 quantiles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krajorama , I massaged this a little bit to keep the topic's focus on exponential histograms. lmk if this works.
|
||
For more information, refer to [Registering Views](https://opentelemetry.io/docs/languages/go/instrumentation/#registering-views) in the OpenTelemetry SDK documentation for Go. | ||
|
||
## Migrate from classic histograms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krajorama do the migration instructions at https://grafana.com/docs/mimir/next/send/native-histograms/#migrate-from-classic-histograms not apply here? If that's the case, how can people migrate?
|
||
## Migrate from classic histograms | ||
|
||
## Bucket boundary calculation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krajorama same question as above.
What this PR does
This PR updates https://grafana.com/docs/mimir/next/send/native-histograms/ with instructions for collecting and sending native histograms with the OTel Collector.
Which issue(s) this PR fixes or relates to
Fixes https://github.com/grafana/mimir-squad/issues/2131)](https://github.com/grafana/mimir-squad/issues/2131
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.