From d03529891f487fffc8ee5feefbad98e0ce604c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 26 Jun 2023 18:52:30 +0200 Subject: [PATCH] Make SDK Tracer/Meter/Logger Creation more normative (#3529) --- CHANGELOG.md | 8 ++++++++ specification/logs/sdk.md | 10 ++++++---- specification/metrics/sdk.md | 10 ++++++---- specification/trace/sdk.md | 10 ++++++---- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b9db4a4037..c8c86d20c6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,21 @@ release. ### Traces +- Make SDK Tracer Creation more normative. + ([#3529](https://github.com/open-telemetry/opentelemetry-specification/pull/3529)) + ### Metrics - Refine SDK MeterProvider configuration section. ([#3522](https://github.com/open-telemetry/opentelemetry-specification/pull/3522)) +- Make SDK Meter Creation more normative. + ([#3529](https://github.com/open-telemetry/opentelemetry-specification/pull/3529)) ### Logs +- Make SDK Logger Creation more normative. + ([#3529](https://github.com/open-telemetry/opentelemetry-specification/pull/3529)) + ### Resource ### Compatibility diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index fba6391949f..4cdbb7dc160 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -54,10 +54,12 @@ The SDK SHOULD allow the creation of multiple independent `LoggerProviders`s. ### Logger Creation -New `Logger` instances are always created through a `LoggerProvider` -(see [Bridge API](bridge-api.md)). The `name`, `version` (optional), -`schema_url` (optional), and `attributes` (optional) supplied to -the `LoggerProvider` must be used to create +It SHOULD only be possible to create `Logger` instances through a `LoggerProvider` +(see [Bridge API](bridge-api.md)). + +The `LoggerProvider` MUST implement the [Get a Logger API](bridge-api.md#get-a-logger). + +The input provided by the user MUST be used to create an [`InstrumentationScope`](../glossary.md#instrumentation-scope) instance which is stored on the created `Logger`. diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 602e1d747f1..873d1324657 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -97,10 +97,12 @@ The SDK SHOULD allow the creation of multiple independent `MeterProvider`s. ### Meter Creation -New `Meter` instances are always created through a `MeterProvider` -(see [API](./api.md#meterprovider)). The `name`, `version` (optional), -`schema_url` (optional), and `attributes` (optional) arguments supplied to -the `MeterProvider` MUST be used to create +It SHOULD only be possible to create `Meter` instances through a `MeterProvider` +(see [API](./api.md#meterprovider)). + +The `MeterProvider` MUST implement the [Get a Meter API](api.md#get-a-meter). + +The input provided by the user MUST be used to create an [`InstrumentationScope`](../glossary.md#instrumentation-scope) instance which is stored on the created `Meter`. diff --git a/specification/trace/sdk.md b/specification/trace/sdk.md index b6e18747ebb..fc4f4711c5c 100644 --- a/specification/trace/sdk.md +++ b/specification/trace/sdk.md @@ -59,10 +59,12 @@ linkTitle: SDK ### Tracer Creation -New `Tracer` instances are always created through a `TracerProvider` -(see [API](api.md#tracerprovider)). The `name`, `version` (optional), -`schema_url` (optional), and `attributes` (optional) arguments supplied to -the `TracerProvider` must be used to create +It SHOULD only be possible to create `Tracer` instances through a `TracerProvider` +(see [API](./api.md#tracerprovider)). + +The `TracerProvider` MUST implement the [Get a Tracer API](api.md#get-a-tracer). + +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`.