diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6f36a8bae..776b76e7af8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,14 +13,21 @@ release. - Remove restriction that sampler description is immutable. ([#4137](https://github.com/open-telemetry/opentelemetry-specification/pull/4137)) +- Define how `TracerProvider` handles identical `Tracer` creation calls. + ([#4146](https://github.com/open-telemetry/opentelemetry-specification/pull/4146)) ### Metrics - Clarify prometheus exporter should have `host` and `port` configuration options. ([#4147](https://github.com/open-telemetry/opentelemetry-specification/pull/4147)) +- Define how `MeterProvider` handles identical `Meter` creation calls. + ([#4146](https://github.com/open-telemetry/opentelemetry-specification/pull/4146)) ### Logs +- Define how `LoggerProvider` handles identical `Logger` creation calls. + ([#4146](https://github.com/open-telemetry/opentelemetry-specification/pull/4146)) + ### Events ### Resource diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index be06ddc56b6..f781c713e40 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -72,6 +72,14 @@ working `Logger` MUST be returned as a fallback rather than returning null or throwing an exception, its `name` SHOULD keep the original invalid value, and a message reporting that the specified value is invalid SHOULD be logged. +For each unique set of identifying parameters, the non-identifying +parameters MUST be associated with the `Logger` at least once. +Currently, it is a user error to create `Logger`s with different +non-identifying parameter values (e.g. instrumentation scope attributes) but +the same identifying parameters. The SDK can handle such cases in its preferred +way. However, it MUST be documented that the behavior may change in future +releases, as this is currently an unsupported usage of the API. + **Status**: [Development](../document-status.md) - The `LoggerProvider` MUST compute the relevant [LoggerConfig](#loggerconfig) using the configured [LoggerConfigurator](#loggerconfigurator), and create diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 8823b4b69f1..a079c857185 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -128,6 +128,14 @@ working Meter MUST be returned as a fallback rather than returning null or throwing an exception, its `name` SHOULD keep the original invalid value, and a message reporting that the specified value is invalid SHOULD be logged. +For each unique set of identifying parameters, the non-identifying +parameters MUST be associated with the `Meter` at least once. +Currently, it is a user error to create `Meter`s with different +non-identifying parameter values (e.g. instrumentation scope attributes) but +the same identifying parameters. The SDK can handle such cases in its preferred +way. However, it MUST be documented that the behavior may change in future +releases, as this is currently an unsupported usage of the API. + When a Schema URL is passed as an argument when creating a `Meter` the emitted telemetry for that `Meter` MUST be associated with the Schema URL, provided that the emitted data format is capable of representing such association. diff --git a/specification/trace/sdk.md b/specification/trace/sdk.md index 622a1e1452b..3fa25af4b78 100644 --- a/specification/trace/sdk.md +++ b/specification/trace/sdk.md @@ -71,6 +71,14 @@ The input provided by the user MUST be used to create an [`InstrumentationScope`](../glossary.md#instrumentation-scope) instance which is stored on the created `Tracer`. +For each unique set of identifying parameters, the non-identifying +parameters MUST be associated with the `Tracer` at least once. +Currently, it is a user error to create `Tracer`s with different +non-identifying parameter values (e.g. instrumentation scope attributes) but +the same identifying parameters. The SDK can handle such cases in its preferred +way. However, it MUST be documented that the behavior may change in future +releases, as this is currently an unsupported usage of the API. + **Status**: [Development](../document-status.md) - The `TracerProvider` MUST compute the relevant [TracerConfig](#tracerconfig) using the configured [TracerConfigurator](#tracerconfigurator), and create @@ -236,7 +244,7 @@ Thus, the SDK specification defines sets of possible requirements for both the full span API as defined in the [API-level definition for span's interface](api.md#span-operations) and additionally must be able to retrieve all information that was added to the span - (as with *readable span*). + (as with _readable span_). It MUST be possible for functions being called with this to somehow obtain the same `Span` instance and type