Skip to content

Commit 6d45339

Browse files
authored
sdk/metric: package example includes Cardinality Limits (#7165)
Part of #6979 Towards #6887 ## What - Examples demonstrate how to configure and use the feature.
1 parent 5a04620 commit 6d45339

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

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

sdk/metric/example_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func Example() {
4545
meterProvider := metric.NewMeterProvider(
4646
metric.WithResource(res),
4747
metric.WithReader(reader),
48+
metric.WithCardinalityLimit(2000),
4849
)
4950

5051
// Handle shutdown properly so that nothing leaks.

0 commit comments

Comments
 (0)