Skip to content

Commit

Permalink
Specify MeterProvider impl creation in SDK doc (#3067)
Browse files Browse the repository at this point in the history
Currently the metric specification defines a normative recommendation
for API implementations in the API specification. The API specification
should be scope to specify the API, not the implementation. Instead move
this recommendation to the SDK specification where the implementation of
the API should be specified.
  • Loading branch information
MrAlias authored Feb 1, 2023
1 parent 69141c3 commit 0c5bfa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 0 additions & 6 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ Normally, the `MeterProvider` is expected to be accessed from a central place.
Thus, the API SHOULD provide a way to set/register and access a global default
`MeterProvider`.

Notwithstanding any global `MeterProvider`, some applications may want to or
have to use multiple `MeterProvider` instances, e.g. to have different
configuration for each, or because its easier with dependency injection
frameworks. Thus, implementations of `MeterProvider` SHOULD allow creating an
arbitrary number of `MeterProvider` instances.

### MeterProvider operations

The `MeterProvider` MUST provide the following functions:
Expand Down
5 changes: 5 additions & 0 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ linkTitle: SDK
<!-- toc -->

- [MeterProvider](#meterprovider)
* [MeterProvider Creation](#meterprovider-creation)
* [Meter Creation](#meter-creation)
* [Shutdown](#shutdown)
* [ForceFlush](#forceflush)
Expand Down Expand Up @@ -74,6 +75,10 @@ metrics produced by any `Meter` from the `MeterProvider`. The [tracing SDK
specification](../trace/sdk.md#additional-span-interfaces) has provided some
suggestions regarding how to implement this efficiently.

### MeterProvider Creation

The SDK SHOULD allow the creation of multiple independent `MeterProvider`s.

### Meter Creation

New `Meter` instances are always created through a `MeterProvider`
Expand Down

0 comments on commit 0c5bfa9

Please sign in to comment.