1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-09-16 09:26:25 +02:00

sdk/metric: package example includes Cardinality Limits (#7165)

Part of #6979
Towards #6887

## What

- Examples demonstrate how to configure and use the feature.
This commit is contained in:
Yevhenii Solomchenko
2025-08-12 09:38:55 +02:00
committed by GitHub
parent 5a046207d2
commit 6d45339855
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `RPCGRPCResponseMetadata`
- Add `ErrorType` attribute helper function to the `go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6962)
- Add `WithAllowKeyDuplication` in `go.opentelemetry.io/otel/sdk/log` which can be used to disable deduplication for log records. (#6968)
- Add `WithCardinalityLimit` option to configure the cardinality limit in `go.opentelemetry.io/otel/sdk/metric`. (#6996, #7065, #7081, #7164)
- Add `WithCardinalityLimit` option to configure the cardinality limit in `go.opentelemetry.io/otel/sdk/metric`. (#6996, #7065, #7081, #7164, #7165)
- Add `Clone` method to `Record` in `go.opentelemetry.io/otel/log` that returns a copy of the record with no shared state. (#7001)
- The `go.opentelemetry.io/otel/semconv/v1.36.0` package.
The package contains semantic conventions from the `v1.36.0` version of the OpenTelemetry Semantic Conventions.

View File

@@ -45,6 +45,7 @@ func Example() {
meterProvider := metric.NewMeterProvider(
metric.WithResource(res),
metric.WithReader(reader),
metric.WithCardinalityLimit(2000),
)
// Handle shutdown properly so that nothing leaks.