Skip to content

Commit 8c1cd64

Browse files
authored
[docs] Tweaks for stable metric point reclaim (open-telemetry#5957)
1 parent 112e17f commit 8c1cd64

File tree

3 files changed

+43
-30
lines changed

3 files changed

+43
-30
lines changed

RELEASENOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ directory of each individual package.
3232
variable is no longer required. For details see: [Cardinality
3333
Limits](./docs/metrics/README.md#cardinality-limits).
3434

35+
* The MetricPoint reclaim behavior is now enabled by default when Delta
36+
aggregation temporality is used. The
37+
`OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS` environment
38+
variable is no longer required. For details see: [Cardinality
39+
Limits](./docs/metrics/README.md#cardinality-limits).
40+
3541
* Added `OpenTelemetrySdk.Create` API for configuring OpenTelemetry .NET signals
3642
(logging, tracing, and metrics) via a single builder. This new API simplifies
3743
bootstrap and teardown, and supports cross-cutting extensions targeting

docs/metrics/README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -388,23 +388,24 @@ and the `MetricStreamConfiguration.CardinalityLimit` setting. Refer to this
388388
[doc](../../docs/metrics/customizing-the-sdk/README.md#changing-the-cardinality-limit-for-a-metric)
389389
for more information.
390390

391-
Given a metric, once the cardinality limit is reached, any new measurement
392-
that could not be independently aggregated will be aggregated using the
393-
[overflow attribute](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#overflow-attribute).
394-
In versions prior to 1.10.0, the default behavior when cardinality limit was
395-
reached was to drop the measurement. Users had the ability to opt-in to use
396-
overflow attribute instead, but this behavior is the default and the only
397-
allowed behavior starting with version 1.10.0.
398-
399-
When [Delta Aggregation
391+
As of `1.10.0` once a metric has reached the cardinality limit, any new
392+
measurement that could not be independently aggregated will be automatically
393+
aggregated using the [overflow
394+
attribute](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#overflow-attribute).
395+
396+
> [!NOTE]
397+
> In SDK versions `1.6.0` - `1.9.0` the overflow attribute was an experimental
398+
feature that could be enabled by setting the environment variable
399+
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE=true`.
400+
401+
As of `1.10.0` when [Delta Aggregation
400402
Temporality](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#temporality)
401-
is used, it is possible to choose a smaller cardinality limit by allowing the
402-
SDK to reclaim unused metric points.
403+
is used, it is possible to choose a smaller cardinality limit because the SDK
404+
will reclaim unused metric points.
403405

404406
> [!NOTE]
405-
> Metric points reclaim is the default and only behavior for Delta Aggregation
406-
Temporality starting with version 1.10.0. In version 1.7.0 - 1.9.0, it was an
407-
experimental feature that could be enabled by setting the environment variable
407+
> In SDK versions `1.7.0` - `1.9.0`, metric point reclaim was an experimental
408+
feature that could be enabled by setting the environment variable
408409
`OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS=true`.
409410

410411
### Memory Preallocation

src/OpenTelemetry/CHANGELOG.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@ Notes](../../RELEASENOTES.md).
66

77
## Unreleased
88

9-
* Promote MetricPoint reclaim feature for delta aggregation from experimental to
10-
stable.
11-
Previously, it is an experimental feature which can be turned on by setting
12-
the environment variable
13-
`OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS=true`.
14-
Now that the [OpenTelemetry
15-
Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#overflow-attribute)
16-
has become stable. The feature is the default and the only allowed behavior
17-
without the need to set an environment variable.
9+
* Promoted the MetricPoint reclaim feature for Delta aggregation temporality
10+
from experimental to stable.
1811
([#5956](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5956))
1912

13+
**Previous Behavior:**
14+
The SDK maintained a fixed set of MetricPoints which were assigned on a
15+
first-come basis based on the tags. MetricPoint reclaim was an experimental
16+
feature users could opt-into setting the environment variable
17+
`OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS=true`.
18+
19+
**New Behavior:**
20+
MetricPoint reclaim is now enabled by default when Delta aggregation
21+
temporality is used without the need to set an environment variable. Unused
22+
MetricPoints will automatically be reclaimed and reused for future
23+
measurements. There is NO ability to revert to the old behavior.
24+
2025
## 1.10.0-rc.1
2126

2227
Released 2024-Nov-01
@@ -27,16 +32,18 @@ Released 2024-Nov-01
2732
([#5926](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5926))
2833

2934
* Promoted overflow attribute from experimental to stable and removed the
30-
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE` environment variable.
35+
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE` environment
36+
variable.
37+
([#5909](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5909))
3138

3239
**Previous Behavior:**
3340
By default, when the cardinality limit was reached, measurements were dropped,
3441
and an internal log was emitted the first time this occurred. Users could
35-
opt-in to experimental overflow attribute feature with
36-
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE=true`.
37-
With this setting, the SDK would use an overflow attribute
38-
(`otel.metric.overflow = true`) to aggregate measurements instead of dropping
39-
measurements. No internal log was emitted in this case.
42+
opt-into experimental overflow attribute feature with
43+
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE=true`. With this
44+
setting, the SDK would use an overflow attribute (`otel.metric.overflow =
45+
true`) to aggregate measurements instead of dropping measurements. No internal
46+
log was emitted in this case.
4047

4148
**New Behavior:**
4249
The SDK now always uses the overflow attribute (`otel.metric.overflow = true`)
@@ -49,7 +56,6 @@ Released 2024-Nov-01
4956
Metric](../../docs/metrics/customizing-the-sdk/README.md#changing-the-cardinality-limit-for-a-metric).
5057

5158
There is NO ability to revert to old behavior.
52-
([#5909](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5909))
5359

5460
* Exposed a `public` constructor on `Batch<T>` which accepts a single instance
5561
of `T` to be contained in the batch.

0 commit comments

Comments
 (0)