Skip to content

Commit

Permalink
MetricProducers are passed via config to MetricReaders instead of Reg…
Browse files Browse the repository at this point in the history
…isterProducer (#3613)
  • Loading branch information
dashpole authored Aug 8, 2023
1 parent ef177f9 commit ad1537a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ release.
([#3627](https://github.com/open-telemetry/opentelemetry-specification/pull/3627))
- Mark Metric No-Op API as stable.
([#3642](https://github.com/open-telemetry/opentelemetry-specification/pull/3642))
- MetricProducers are provided as config to MetricReaders instead of through a RegisterProducer operation.
([#3613](https://github.com/open-telemetry/opentelemetry-specification/pull/3613))

### Logs

Expand Down
17 changes: 1 addition & 16 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ linkTitle: SDK
+ [AlignedHistogramBucketExemplarReservoir](#alignedhistogrambucketexemplarreservoir)
- [MetricReader](#metricreader)
* [MetricReader operations](#metricreader-operations)
+ [RegisterProducer(metricProducer)](#registerproducermetricproducer)
+ [Collect](#collect)
+ [Shutdown](#shutdown-1)
* [Periodic exporting MetricReader](#periodic-exporting-metricreader)
Expand Down Expand Up @@ -1047,6 +1046,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.
* **Status**: [Experimental](../document-status.md) - 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 @@ -1103,21 +1103,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 ad1537a

Please sign in to comment.