You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update default temporality to spec
The spec requirements for temporality have changed since our implementation of metrics. Now, Cumulative is the preferred default.
A temporality preference of LowMemory is now in spec, which was partially implemented for declarative config, but not for environment-based
autoloading. Added some integration tests to validate temporality settings for different preference inputs.
Added some non-spec otlp transports (stdout/nd-json and memory/json), since they exercise more of the otlp metrics codebase than the existing
InMemory exporters, and made integration testing for temporality easier.
* remove invalid default OTEL_METRICS_EXPORTER, fix test name
* move test transports under tests/
* remove stream temporality
* tests
* temporality is a function of instrument kind
* temporality selection
centralize temporality selection into a trait and re-use across metric exporters
remove temporality as a function of stream type (spec now says that temporality is a function of
instrument + preference
* add check and warning that async callbacks must not return a value
...and add tests that gauges do not have a temporality
* add stdout factories
* remove unused stdout transport
* remove stdout transport, hash _register.php files
* update temporality upgrade docs
* use AggregationTemporalitySelectorInterface to provide temporality preference
based on opentelemetry-java's implementation, the spec-defined preferences are defined in
SDK/Metrics/AggregationTemporalitySelector
* test gauge temporality, update docs
* fix gauge temporality, add tests based on Java's
* Update src/SDK/Metrics/AggregationTemporalitySelector.php
Co-authored-by: Tobias Bachert <[email protected]>
* update test
---------
Co-authored-by: Tobias Bachert <[email protected]>
Copy file name to clipboardExpand all lines: docs/upgrading.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,16 @@ providing a higher priority for the same type).
30
30
Methods which previously accepted `Temporality|string`, or `InstrumentType|string` no longer accept strings.
31
31
`$advisory` is now a required parameter for `OpenTelemetry\SDK\Metrics\DefaultAggregationProviderInterface`.
32
32
33
+
If the SDK is configured via autoloading (using environment variables or declarative (yaml) config), the default temporality
34
+
is `Cumulative` for all instruments, per [spec](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.48.0/specification/metrics/sdk_exporters/otlp.md#general).
35
+
This can be changed by setting the temporality preference via `OTEL_METRIC_TEMPORALITY_PREFERENCE` environment variable. Possible
36
+
values are `cumulative`, `delta`, or `lowmemory`.
37
+
38
+
If the SDK is configured programmatically, an exporter should be configured with an `AggregationTemporalitySelectorInterface`.
39
+
The SDK-provided implementations are `AggregationTemporalitySelector::alwaysCumulative()`, `::deltaPreferred()`,
40
+
and `::lowMemory()`. The default selector is cumulative.
41
+
33
42
#### TracerProvider
34
43
`TracerProvider` constructor now accepts a `SpanProcessorInterface` as the first argument, rather than an array of
35
44
`SpanProcessorInterface`s. If multiple processors are required, they should be added to a `MultiSpanProcessor` (which
0 commit comments