diff --git a/CHANGELOG.md b/CHANGELOG.md index e055042816a..7bb00accd40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,11 @@ release. ### SDK Configuration +- Declarative configuration: rename `ComponentProvider` to + `PluginComponentProvider`, `CreatePlugin` to `CreateComponent` in effort to + use consistent vocabulary + ([#4806](https://github.com/open-telemetry/opentelemetry-specification/pull/4806)) + ### Supplementary Guidelines ### OTEPs diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 0850827b135..d602c5acb09 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -297,15 +297,15 @@ Disclaimer: Declarative configuration is currently in Development status - work | The `Parse` operation accepts the configuration YAML file format | + | + | + | | | | + | | + | | | | The `Parse` operation performs environment variable substitution | + | + | | | | | + | | + | | | | The `Parse` operation returns configuration model | + | + | + | | | | + | | + | | | -| The `Parse` operation resolves extension component configuration to `properties` | | + | | | | | + | | + | | | +| The `Parse` operation resolves plugin component configuration to `properties` | | + | | | | | + | | + | | | | `Create` SDK components | + | + | | | | | + | | + | | | | The `Create` operation accepts configuration model | + | + | | | | | + | | + | | | | The `Create` operation returns `TracerProvider` | + | + | | | | | + | | + | | | | The `Create` operation returns `MeterProvider` | + | + | | | | | + | | + | | | | The `Create` operation returns `LoggerProvider` | + | + | | | | | + | | + | | | | The `Create` operation returns `Propagators` | | + | | | | | + | | + | | | -| The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components | | + | | | | | + | | + | | | -| Register a `ComponentProvider` | | + | | | | | + | | + | | | +| The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components | | + | | | | | + | | + | | | +| Register a `PluginComponentProvider` | | + | | | | | + | | + | | | ## Exporters diff --git a/spec-compliance-matrix/cpp.yaml b/spec-compliance-matrix/cpp.yaml index 06bd84378e7..4182d2bda1b 100644 --- a/spec-compliance-matrix/cpp.yaml +++ b/spec-compliance-matrix/cpp.yaml @@ -509,7 +509,7 @@ sections: status: '+' - name: The `Parse` operation returns configuration model status: '+' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '+' - name: '`Create` SDK components' status: '+' @@ -523,9 +523,9 @@ sections: status: '+' - name: The `Create` operation returns `Propagators` status: '+' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '+' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '+' - name: Exporters features: diff --git a/spec-compliance-matrix/dotnet.yaml b/spec-compliance-matrix/dotnet.yaml index 1cf18ae00fc..6bcffc9876b 100644 --- a/spec-compliance-matrix/dotnet.yaml +++ b/spec-compliance-matrix/dotnet.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '?' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/erlang.yaml b/spec-compliance-matrix/erlang.yaml index 5ca5cda60e1..641f94c5695 100644 --- a/spec-compliance-matrix/erlang.yaml +++ b/spec-compliance-matrix/erlang.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '?' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/go.yaml b/spec-compliance-matrix/go.yaml index 98eb6e142f3..70e56f0fa15 100644 --- a/spec-compliance-matrix/go.yaml +++ b/spec-compliance-matrix/go.yaml @@ -509,7 +509,7 @@ sections: status: '+' - name: The `Parse` operation returns configuration model status: '+' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '+' @@ -523,9 +523,9 @@ sections: status: '+' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/java.yaml b/spec-compliance-matrix/java.yaml index ec7305cbbaa..842ceaac277 100644 --- a/spec-compliance-matrix/java.yaml +++ b/spec-compliance-matrix/java.yaml @@ -509,7 +509,7 @@ sections: status: '+' - name: The `Parse` operation returns configuration model status: '+' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '+' - name: '`Create` SDK components' status: '+' @@ -523,9 +523,9 @@ sections: status: '+' - name: The `Create` operation returns `Propagators` status: '+' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '+' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '+' - name: Exporters features: diff --git a/spec-compliance-matrix/js.yaml b/spec-compliance-matrix/js.yaml index ddd976cac51..fb5b0aa9178 100644 --- a/spec-compliance-matrix/js.yaml +++ b/spec-compliance-matrix/js.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '+' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/php.yaml b/spec-compliance-matrix/php.yaml index 23da2485cdf..a5f8756fa61 100644 --- a/spec-compliance-matrix/php.yaml +++ b/spec-compliance-matrix/php.yaml @@ -509,7 +509,7 @@ sections: status: '+' - name: The `Parse` operation returns configuration model status: '+' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '+' - name: '`Create` SDK components' status: '+' @@ -523,9 +523,9 @@ sections: status: '+' - name: The `Create` operation returns `Propagators` status: '+' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '+' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '+' - name: Exporters features: diff --git a/spec-compliance-matrix/python.yaml b/spec-compliance-matrix/python.yaml index 663ceaee488..58942dcd66f 100644 --- a/spec-compliance-matrix/python.yaml +++ b/spec-compliance-matrix/python.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '?' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/ruby.yaml b/spec-compliance-matrix/ruby.yaml index 134cbb9fe34..9080bec7441 100644 --- a/spec-compliance-matrix/ruby.yaml +++ b/spec-compliance-matrix/ruby.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '?' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/rust.yaml b/spec-compliance-matrix/rust.yaml index 167239fa822..f68a4a6311b 100644 --- a/spec-compliance-matrix/rust.yaml +++ b/spec-compliance-matrix/rust.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '?' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/swift.yaml b/spec-compliance-matrix/swift.yaml index df9e44772e5..0b15b8b9ca7 100644 --- a/spec-compliance-matrix/swift.yaml +++ b/spec-compliance-matrix/swift.yaml @@ -509,7 +509,7 @@ sections: status: '?' - name: The `Parse` operation returns configuration model status: '?' - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` status: '?' - name: '`Create` SDK components' status: '?' @@ -523,9 +523,9 @@ sections: status: '?' - name: The `Create` operation returns `Propagators` status: '?' - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components status: '?' - - name: Register a `ComponentProvider` + - name: Register a `PluginComponentProvider` status: '?' - name: Exporters features: diff --git a/spec-compliance-matrix/template.yaml b/spec-compliance-matrix/template.yaml index b4651989e60..e11835d30d3 100644 --- a/spec-compliance-matrix/template.yaml +++ b/spec-compliance-matrix/template.yaml @@ -322,15 +322,15 @@ sections: - name: The `Parse` operation accepts the configuration YAML file format - name: The `Parse` operation performs environment variable substitution - name: The `Parse` operation returns configuration model - - name: The `Parse` operation resolves extension component configuration to `properties` + - name: The `Parse` operation resolves plugin component configuration to `properties` - name: '`Create` SDK components' - name: The `Create` operation accepts configuration model - name: The `Create` operation returns `TracerProvider` - name: The `Create` operation returns `MeterProvider` - name: The `Create` operation returns `LoggerProvider` - name: The `Create` operation returns `Propagators` - - name: The `Create` operation calls `CreatePlugin` of corresponding `ComponentProvider` when encountering extension components - - name: Register a `ComponentProvider` + - name: The `Create` operation calls `CreateComponent` of corresponding `PluginComponentProvider` when encountering plugin components + - name: Register a `PluginComponentProvider` hide_optional_column: true - name: Exporters features: diff --git a/specification/configuration/README.md b/specification/configuration/README.md index 79b736c9379..1e2d2e6e906 100644 --- a/specification/configuration/README.md +++ b/specification/configuration/README.md @@ -51,7 +51,7 @@ Declarative configuration consists of the following main components: configuration options during initialization. * [Configuration SDK](./sdk.md) defines SDK capabilities around file configuration, including an In-Memory configuration model, support for - referencing custom extension plugin interfaces in configuration files, and + referencing custom plugin components in configuration files, and operations to parse configuration files and interpret the configuration data model. diff --git a/specification/configuration/sdk-environment-variables.md b/specification/configuration/sdk-environment-variables.md index 31188fafb0d..2fd9aff20ed 100644 --- a/specification/configuration/sdk-environment-variables.md +++ b/specification/configuration/sdk-environment-variables.md @@ -344,11 +344,11 @@ configuration model. Implementations MAY provide a mechanism to customize the configuration model parsed from `OTEL_EXPERIMENTAL_CONFIG_FILE`. Users are encouraged to -use [`sdk-migration-config.yaml`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/otel-sdk-migration-config.yaml) +use [`otel-sdk-migration-config.yaml`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/otel-sdk-migration-config.yaml) as a starting point for `OTEL_EXPERIMENTAL_CONFIG_FILE`. This file represents a common SDK configuration scenario, and includes environment variable substitution references to environment variables which are otherwise ignored. -Alternatively, [`sdk-config.yaml`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/otel-sdk-config.yaml) +Alternatively, [`otel-sdk-config.yaml`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/otel-sdk-config.yaml) offers a common SDK configuration starting point without environment variable substitution references. diff --git a/specification/configuration/sdk.md b/specification/configuration/sdk.md index 296cbd13810..5a1a1f0c983 100644 --- a/specification/configuration/sdk.md +++ b/specification/configuration/sdk.md @@ -13,14 +13,14 @@ weight: 3 * [In-Memory configuration model](#in-memory-configuration-model) * [ConfigProvider](#configprovider) * [SDK extension components](#sdk-extension-components) - + [ComponentProvider](#componentprovider) - - [Supported SDK extension plugins](#supported-sdk-extension-plugins) - - [ComponentsProvider operations](#componentsprovider-operations) - * [Create Plugin](#create-plugin) + + [PluginComponentProvider](#plugincomponentprovider) + - [Supported SDK plugin components](#supported-sdk-plugin-components) + - [PluginComponentProvider operations](#plugincomponentprovider-operations) + * [Create Component](#create-component) * [SDK operations](#sdk-operations) + [Parse](#parse) + [Create](#create) - + [Register ComponentProvider](#register-componentprovider) + + [Register PluginComponentProvider](#register-plugincomponentprovider) * [Examples](#examples) + [Via configuration API](#via-configuration-api) + [Via OTEL_EXPERIMENTAL_CONFIG_FILE](#via-otel_experimental_config_file) @@ -69,19 +69,20 @@ mapping node of the [configuration model](./data-model.md). ### SDK extension components -The SDK supports a variety of -extension [plugin interfaces](../glossary.md#sdk-plugins), allowing users and -libraries to customize behaviors including the sampling, processing, and -exporting of data. In general, the [configuration data model](./data-model.md) -defines specific types for built-in implementations of these plugin interfaces. -For example, +The SDK supports a variety of [plugin components](../glossary.md#sdk-plugins), +also called "extension plugin interfaces", allowing users and libraries to +customize behaviors including the sampling, processing, and exporting of data. + +The [configuration data model](./data-model.md) SHOULD define specific types +for built-in implementations of these plugin components. For example, the [BatchSpanProcessor](https://github.com/open-telemetry/opentelemetry-configuration/blob/f38ac7c3a499ae5f81924ef9c455c27a56130562/schema/tracer_provider.json#L22) type refers to the -built-in [Batching span processor](../trace/sdk.md#batching-processor). The -schema SHOULD also support the ability to specify custom implementations of -plugin interfaces defined by libraries or users. +built-in [Batching span processor](../trace/sdk.md#batching-processor). -For example, a custom [span exporter](../trace/sdk.md#span-exporter) might be configured as follows: +The schema SHOULD support the ability to specify custom implementations of +plugin components defined by libraries or users. For example, a +custom [span exporter](../trace/sdk.md#span-exporter) might be configured as +follows: ```yaml tracer_provider: @@ -95,14 +96,14 @@ tracer_provider: Here we specify that the tracer provider has a batch span processor paired with a custom span exporter named `my-exporter`, which is configured with `config-parameter: value`. For this configuration to succeed, -a [`ComponentProvider`](#componentprovider) must -be [registered](#register-componentprovider) with `type: SpanExporter`, +a [`PluginComponentProvider`](#plugincomponentprovider) must +be [registered](#register-plugincomponentprovider) with `type: SpanExporter`, and `name: my-exporter`. When [parse](#parse) is called, the implementation will encounter `my-exporter` and translate the corresponding configuration to an equivalent [`ConfigProperties`](./api.md#configproperties) representation ( i.e. `properties: {config-parameter: value}`). When [create](#create) is called, the implementation will encounter `my-exporter` and -invoke [create plugin](#create-plugin) on the registered `ComponentProvider`with +invoke [create component](#create-component) on the registered `PluginComponentProvider`with the `ConfigProperties` determined during `parse`. Given the inherent differences across languages, the details of extension @@ -110,33 +111,27 @@ component mechanisms are likely to vary to a greater degree than is the case with other APIs defined by OpenTelemetry. This is to be expected and is acceptable so long as the implementation results in the defined behaviors. -#### ComponentProvider +#### PluginComponentProvider -A `ComponentProvider` is responsible for interpreting configuration and returning -an implementation of a particular type of SDK extension plugin interface. +A `PluginComponentProvider` is responsible for interpreting configuration and returning +an implementation of a particular type of SDK plugin component. -`ComponentProvider`s are registered with an SDK implementation of configuration -via [register](#register-componentprovider). This MAY be done automatically or +`PluginComponentProvider`s are registered with an SDK implementation of configuration +via [register](#register-plugincomponentprovider). This MAY be done automatically or require manual intervention by the user based on what is possible and idiomatic -in the language ecosystem. For example in Java, `ComponentProvider`s might be +in the language ecosystem. For example in Java, `PluginComponentProvider`s might be registered automatically using the [service provider interface (SPI)](https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html) mechanism. -See [create](#create), which details `ComponentProvider` usage in +See [create](#create), which details `PluginComponentProvider` usage in configuration model interpretation. -##### Supported SDK extension plugins - -The [configuration data model](./data-model.md) SHOULD support configuration of -all SDK extension plugin interfaces. SDKs SHOULD -support [registration](#register-componentprovider) of custom implementations of -SDK extension plugin interfaces via the `ComponentProvider` mechanism. +##### Supported SDK plugin components -The following table lists each SDK extension plugin interface and its -corresponding type in the configuration data model: +The following table lists the current status of all SDK plugin components in the configuration data model: -| SDK extension plugin interface | Declarative config type | +| SDK plugin component | Declarative config type | |---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| | [resource detector](../resource/sdk.md#detecting-resource-information-from-the-environment) | [ExperimentalResourceDetection](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema-docs.md#experimentalresourcedetection-) | | [text map propagator](../context/api-propagators.md#textmap-propagator) | [TextMapPropagator](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema-docs.md#textmappropagator-) | @@ -151,16 +146,15 @@ corresponding type in the configuration data model: | [log record exporter](../logs/sdk.md#logrecordexporter) | [LogRecordExporter](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema-docs.md#logrecordexporter-) | | [log record processor](../logs/sdk.md#logrecordprocessor) | [LogRecordProcessor](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema-docs.md#logrecordprocessor-) | -##### ComponentsProvider operations +##### PluginComponentProvider operations -The `ComponentsProvider` MUST provide the following functions: +The `PluginComponentProvider` MUST provide the following functions: -* [Create Plugin](#create-plugin) +* [Create Component](#create-component) -###### Create Plugin +###### Create Component -Interpret configuration to create a instance of a SDK extension plugin -interface. +Interpret configuration to create an instance of an SDK plugin component. **Parameters:** @@ -168,18 +162,18 @@ interface. configuration specified for the component in the [configuration model](#in-memory-configuration-model). -**Returns:** A configured SDK extension plugin interface implementation. +**Returns:** A configured SDK plugin component. -The plugin interface MAY have properties which are optional or required, and +The plugin component MAY have properties which are optional or required, and have specific requirements around type or format. The set of properties a -`ComponentProvider` accepts, along with their requirement level and expected -type, comprise a configuration schema. A `ComponentProvider` SHOULD document its +`PluginComponentProvider` accepts, along with their requirement level and expected +type, comprise a configuration schema. A `PluginComponentProvider` SHOULD document its configuration schema and include examples. -When Create Plugin is invoked, the `ComponentProvider` interprets `properties` +When Create Component is invoked, the `PluginComponentProvider` interprets `properties` and attempts to extract data according to its configuration schema. If this fails (e.g. a required property is not present, a type is mismatches, etc.), -Create Plugin SHOULD return an error. +Create Component SHOULD return an error. ### SDK operations @@ -233,7 +227,7 @@ When encountering a reference to a [SDK extension component](#sdk-extension-components) which is not built in to the SDK, Parse MUST resolve corresponding configuration to a generic [ConfigProperties](./api.md#configproperties) representation as described -in [Create Plugin](#create-plugin). +in [Create Component](#create-component). Parse SHOULD return an error if: @@ -289,13 +283,13 @@ and `ca_file` is not an absolute file path as defined in the property description, return an error. When encountering a reference to -a [SDK extension component](#sdk-extension-components) which is not built in to -the SDK, Create MUST resolve the component using [Create Plugin](#create-plugin) -of the [`ComponentProvider`](#componentprovider) of the corresponding `type` -and `name` used to [register](#register-componentprovider), including the -configuration `properties` as an argument. If no `ComponentProvider` is +an [SDK plugin component](#sdk-extension-components) which is not built in to +the SDK, Create MUST resolve the component using [Create Component](#create-component) +of the [`PluginComponentProvider`](#plugincomponentprovider) of the corresponding `type` +and `name` used to [register](#register-plugincomponentprovider), including the +configuration `properties` as an argument. If no `PluginComponentProvider` is registered with the `type` and `name`, Create SHOULD return an error. -If [Create Plugin](#create-plugin) returns an error, Create SHOULD propagate the +If [Create Component](#create-component) returns an error, Create SHOULD propagate the error. This SHOULD return an error if it encounters an error in `configuration` (i.e. @@ -327,19 +321,20 @@ component from the resolved top level SDK components. TODO: define behavior if some portion of configuration model is not supported -#### Register ComponentProvider +#### Register PluginComponentProvider The SDK MUST provide a mechanism to -register [`ComponentProvider`](#componentprovider). The mechanism MAY be +register [`PluginComponentProvider`](#plugincomponentprovider). The mechanism MAY be language-specific and automatic. For example, a java implementation might use the [service provider interface](https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html) mechanism to register implementations of a particular interface -as `ComponentProvider`s. +as `PluginComponentProvider`s. **Parameters:** -* `component_provider` - The `ComponentProvider`. -* `type` - The type of plugin interface it provides. +* `plugin_component_provider` - The `PluginComponentProvider`. +* `type` - The type of plugin component it provides (e.g. SpanExporter, Sampler, + etc). * `name` - The name used to identify the type of component. This is used in [configuration model](./data-model.md) to specify that the corresponding `component_provider` is to provide the component. diff --git a/specification/configuration/supplementary-guidelines.md b/specification/configuration/supplementary-guidelines.md index ad58572d1d2..2f8fc776daa 100644 --- a/specification/configuration/supplementary-guidelines.md +++ b/specification/configuration/supplementary-guidelines.md @@ -61,5 +61,5 @@ improving the declarative config data model. For example, the fact that configuration of dynamic authentication for OTLP exporters is not possible to express with declarative config should not encourage the OpenTelemetry community to have better programmatic customization. -Instead, we should pursue adding authentication as an SDK extension plugin -interface and modeling this new plugin in declarative config. +Instead, we should pursue adding authentication as an SDK plugin component and +modeling in declarative config.