Skip to content

Commit

Permalink
MetricProducers are provided as config to MetricReaders instead of th…
Browse files Browse the repository at this point in the history
…rough a RegisterProducer operation
  • Loading branch information
dashpole committed Jul 20, 2023
1 parent dc78006 commit 25a6902
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ release.

### Metrics

- MetricProducers are provided as config to MetricReaders instead of through a RegisterProducer operation.
([#3613](https:/open-telemetry/opentelemetry-specification/pull/3613))

### Logs

### Resource
Expand Down
17 changes: 1 addition & 16 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ linkTitle: SDK
* [Exemplar defaults](#exemplar-defaults)
- [MetricReader](#metricreader)
* [MetricReader operations](#metricreader-operations)
+ [RegisterProducer(metricProducer)](#registerproducermetricproducer)
+ [Collect](#collect)
+ [Shutdown](#shutdown-1)
* [Periodic exporting MetricReader](#periodic-exporting-metricreader)
Expand Down Expand Up @@ -1042,6 +1041,7 @@ SHOULD provide at least the following:
* The default output `aggregation` (optional), a function of instrument kind. If not configured, the [default aggregation](#default-aggregation) SHOULD be used.
* The default output `temporality` (optional), a function of instrument kind. If not configured, the Cumulative temporality SHOULD be used.
* The default aggregation cardinality limit to use, a function of instrument kind. If not configured, a default value of 2000 SHOULD be used.
* **Status**: [Experimental](../document-status.md). Zero of more [MetricProducer](#metricproducer)s (optional) to collect metrics from in addition to metrics from the SDK.

The [MetricReader.Collect](#collect) method allows general-purpose
`MetricExporter` instances to explicitly initiate collection, commonly
Expand Down Expand Up @@ -1097,21 +1097,6 @@ functions.

### MetricReader operations

#### RegisterProducer(metricProducer)

**Status**: [Experimental](../document-status.md)

RegisterProducer causes the MetricReader to use the provided
[MetricProducer](#metricproducer) as a source of aggregated metric data in
subsequent invocations of Collect. RegisterProducer is expected to be called
during initialization, but MAY be invoked later. Multiple registrations
of the same MetricProducer MAY result in duplicate metric data being collected.

If the [MeterProvider](#meterprovider) is an instance of
[MetricProducer](#metricproducer), this MAY be used to register the
MeterProvider, but MUST NOT allow multiple [MeterProviders](#meterprovider)
to be registered with the same MetricReader.

#### Collect

Collects the metrics from the SDK and any registered
Expand Down

0 comments on commit 25a6902

Please sign in to comment.