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

docs: adds instructions for collecting and sending native histograms with otel collector #9328

Merged
merged 16 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/sources/mimir/send/native-histograms/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,33 @@ Use the latest version of [Grafana Alloy](https://grafana.com/docs/alloy/<ALLOY_
}
```

## Collect and send native histograms with the OpenTelemetry Collector

Use the OpenTelemetry SDK to collect and send native histograms with the OpenTelemetry Collector. You can instrument the collector using either Go or Java.

### Instrument the OpenTelemetry Collector using Go

Use the OpenTelemetry SDK version 1.17.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/go/instrumentation/#metrics) in the OpenTelemetry SDK documentation for Go.
1. To aggregate a histogram instrument as an exponential histogram, include the following view:

```
Aggregation: metric.AggregationBase2ExponentialHistogram{
MaxSize: 160,
MaxScale: 20,
}
```

For more information, refer to [Registering Views](https://opentelemetry.io/docs/languages/go/instrumentation/#registering-views) in the OpenTelemetry SDK documentation for Go.

### Instrument the OpenTelemetry Collector using Java

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:

## Migrate from classic histograms

To ease the migration process, you can keep the custom bucket definition of a classic histogram and add native histogram buckets at the same time.
Expand Down
Loading