Skip to content

Commit 482f788

Browse files
committed
Updated typehints for _collect callback.
Added Changelog entry for the public API
1 parent f1b3c36 commit 482f788

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.changelog/4863.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-sdk`: add `add_metric_reader` / `remove_metric_reader` public APIs to register / unregister metric readers at runtime.

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def __init__(
229229
AggregationTemporality,
230230
],
231231
Iterable[opentelemetry.sdk.metrics.export.Metric],
232-
] = None
232+
] | None = None
233233

234234
self._instrument_class_temporality = {
235235
_Counter: AggregationTemporality.CUMULATIVE,
@@ -373,7 +373,7 @@ def _set_collect_callback(
373373
AggregationTemporality,
374374
],
375375
MetricsData,
376-
],
376+
] | None,
377377
) -> None:
378378
"""This function is internal to the SDK. It should not be called or overridden by users"""
379379
self._collect = func

0 commit comments

Comments
 (0)