From 6d453398558227d1063e772ca280ca9185ffd634 Mon Sep 17 00:00:00 2001 From: Yevhenii Solomchenko Date: Tue, 12 Aug 2025 09:38:55 +0200 Subject: [PATCH] sdk/metric: package example includes Cardinality Limits (#7165) Part of #6979 Towards #6887 ## What - Examples demonstrate how to configure and use the feature. --- CHANGELOG.md | 2 +- sdk/metric/example_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce94b8c7..c8630bbd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/sdk/metric/example_test.go b/sdk/metric/example_test.go index 234bfd659..60ca92045 100644 --- a/sdk/metric/example_test.go +++ b/sdk/metric/example_test.go @@ -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.