From 92213ba5bb38ab94f7b3996fc753217f419fee2b Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 1 Feb 2023 08:48:09 -0800 Subject: [PATCH] Specify MeterProvider impl creation in SDK doc (#3067) 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. --- specification/metrics/api.md | 6 ------ specification/metrics/sdk.md | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/specification/metrics/api.md b/specification/metrics/api.md index 57f14003709..663e4d46a17 100644 --- a/specification/metrics/api.md +++ b/specification/metrics/api.md @@ -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: diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index f11de6258ea..f9e358e1542 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -12,6 +12,7 @@ linkTitle: SDK - [MeterProvider](#meterprovider) + * [MeterProvider Creation](#meterprovider-creation) * [Meter Creation](#meter-creation) * [Shutdown](#shutdown) * [ForceFlush](#forceflush) @@ -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`