Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

* Add development max_export_batch_size configuration to Periodic MetricReader
([#610](https://github.com/open-telemetry/opentelemetry-configuration/pull/610))
* Add `id_generator` SDK extension plugin to `TracerProvider`, with built-in
`random` mapping to the spec-default random TraceId/SpanId generation
([#70](https://github.com/open-telemetry/opentelemetry-configuration/issues/70))

## [v1.0.0] - 2026-02-27

Expand Down
20 changes: 15 additions & 5 deletions language-support-status.md

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions opentelemetry_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,23 @@
}
}
},
"IdGenerator": {
"type": "object",
"additionalProperties": {
"type": [
"object",
"null"
]
},
"minProperties": 1,
"maxProperties": 1,
"properties": {
"random": {
"$ref": "#/$defs/RandomIdGenerator",
"description": "Configure the ID generator to randomly generate TraceIds and SpanIds (spec default).\nIf omitted, ignore.\n"
}
}
},
"IncludeExclude": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -2107,6 +2124,13 @@
}
}
},
"RandomIdGenerator": {
"type": [
"object",
"null"
],
"additionalProperties": false
},
"Resource": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -2436,6 +2460,10 @@
"$ref": "#/$defs/Sampler",
"description": "Configure the sampler.\nIf omitted, parent based sampler with a root of always_on is used.\n"
},
"id_generator": {
"$ref": "#/$defs/IdGenerator",
"description": "Configure the trace and span ID generator.\nIf omitted, an ID generator which randomly generates TraceIds and SpanIds is used.\n"
},
"tracer_configurator/development": {
"$ref": "#/$defs/ExperimentalTracerConfigurator",
"description": "Configure tracers.\nIf omitted, all tracers use default values as described in ExperimentalTracerConfig.\n"
Expand Down
96 changes: 96 additions & 0 deletions schema-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,68 @@ No snippets.
}</pre>
</details>

## IdGenerator <a id="idgenerator"></a>

`IdGenerator` is an [SDK extension plugin](#sdk-extension-plugins).

| Property | Type | Required? | Default and Null Behavior | Constraints | Description |
|---|---|---|---|---|---|
| `random` | [`RandomIdGenerator`](#randomidgenerator) | `false` | If omitted, ignore. | No constraints. | Configure the ID generator to randomly generate TraceIds and SpanIds (spec default). |

<details>
<summary>Language support status</summary>

| Property | [cpp](language-support-status.md#cpp) | [go](language-support-status.md#go) | [java](language-support-status.md#java) | [js](language-support-status.md#js) | [php](language-support-status.md#php) |
|---|---|---|---|---|---|
| `random` | unknown | unknown | unknown | unknown | unknown |
</details>

Constraints:

* `additionalProperties`: `{"type":["object","null"]}`
* `minProperties`: `1`
* `maxProperties`: `1`

Usages:

* [`TracerProvider.id_generator`](#tracerprovider)

Snippets:

<details>
<summary>Custom</summary>

[Snippet Source File](./snippets/IdGenerator_custom.yaml)
```yaml
# configure a custom ID generator registered via PluginComponentProvider
my_custom_id_generator:
property: value
```
</details>

<details>
<summary>JSON Schema</summary>

[JSON Schema Source File](./schema/tracer_provider.yaml)
<pre>{
"type": "object",
"additionalProperties": {
"type": [
"object",
"null"
]
},
"minProperties": 1,
"maxProperties": 1,
"properties": {
"random": {
"$ref": "#/$defs/RandomIdGenerator",
"description": "Configure the ID generator to randomly generate TraceIds and SpanIds (spec default).\nIf omitted, ignore.\n"
}
}
}</pre>
</details>

## IncludeExclude <a id="includeexclude"></a>

| Property | Type | Required? | Default and Null Behavior | Constraints | Description |
Expand Down Expand Up @@ -3053,6 +3115,33 @@ No snippets.
}</pre>
</details>

## RandomIdGenerator <a id="randomidgenerator"></a>

No properties.

Constraints:

* `additionalProperties`: `false`

Usages:

* [`IdGenerator.random`](#idgenerator)

No snippets.

<details>
<summary>JSON Schema</summary>

[JSON Schema Source File](./schema/tracer_provider.yaml)
<pre>{
"type": [
"object",
"null"
],
"additionalProperties": false
}</pre>
</details>

## Resource <a id="resource"></a>

| Property | Type | Required? | Default and Null Behavior | Constraints | Description |
Expand Down Expand Up @@ -4035,6 +4124,7 @@ No snippets.

| Property | Type | Required? | Default and Null Behavior | Constraints | Description |
|---|---|---|---|---|---|
| `id_generator` | [`IdGenerator`](#idgenerator) | `false` | If omitted, an ID generator which randomly generates TraceIds and SpanIds is used. | No constraints. | Configure the trace and span ID generator.<br> |
| `limits` | [`SpanLimits`](#spanlimits) | `false` | If omitted, default values as described in SpanLimits are used. | No constraints. | Configure span limits. See also attribute_limits. |
| `processors` | `array` of [`SpanProcessor`](#spanprocessor) | `true` | Property is required and must be non-null. | * `minItems`: `1`<br> | Configure span processors. |
| `sampler` | [`Sampler`](#sampler) | `false` | If omitted, parent based sampler with a root of always_on is used. | No constraints. | Configure the sampler.<br> |
Expand All @@ -4045,6 +4135,7 @@ No snippets.

| Property | [cpp](language-support-status.md#cpp) | [go](language-support-status.md#go) | [java](language-support-status.md#java) | [js](language-support-status.md#js) | [php](language-support-status.md#php) |
|---|---|---|---|---|---|
| `id_generator` | supported | unknown | supported | unknown | supported |
| `limits` | supported | unknown | supported | unknown | supported |
| `processors` | supported | unknown | supported | unknown | supported |
| `sampler` | supported | unknown | supported | unknown | supported |
Expand Down Expand Up @@ -4086,6 +4177,10 @@ No snippets.
"$ref": "#/$defs/Sampler",
"description": "Configure the sampler.\nIf omitted, parent based sampler with a root of always_on is used.\n"
},
"id_generator": {
"$ref": "#/$defs/IdGenerator",
"description": "Configure the trace and span ID generator.\nIf omitted, an ID generator which randomly generates TraceIds and SpanIds is used.\n"
},
"tracer_configurator/development": {
"$ref": "#/$defs/ExperimentalTracerConfigurator",
"description": "Configure tracers.\nIf omitted, all tracers use default values as described in ExperimentalTracerConfig.\n"
Expand Down Expand Up @@ -7114,6 +7209,7 @@ Each of the following types support referencing custom interface implementations
SDK extension plugin types may have properties defined corresponding to built-in implementations of the interface. For example, the `otlp_http` property of `SpanExporter` defines the OTLP http/protobuf exporter.

* [ExperimentalResourceDetector](#ExperimentalResourceDetector)
* [IdGenerator](#IdGenerator)
* [LogRecordExporter](#LogRecordExporter)
* [LogRecordProcessor](#LogRecordProcessor)
* [MetricProducer](#MetricProducer)
Expand Down
6 changes: 6 additions & 0 deletions schema/meta_schema_language_cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ typeSupportStatuses:
- type: HttpTls
status: supported
propertyOverrides: []
- type: IdGenerator
status: unknown
propertyOverrides: []
- type: IncludeExclude
status: supported
propertyOverrides: []
Expand Down Expand Up @@ -148,6 +151,9 @@ typeSupportStatuses:
- type: PushMetricExporter
status: supported
propertyOverrides: []
- type: RandomIdGenerator
status: unknown
propertyOverrides: []
- type: Resource
status: supported
propertyOverrides: []
Expand Down
6 changes: 6 additions & 0 deletions schema/meta_schema_language_go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ typeSupportStatuses:
- type: HttpTls
status: supported
propertyOverrides: []
- type: IdGenerator
status: unknown
propertyOverrides: []
- type: IncludeExclude
status: supported
propertyOverrides: []
Expand Down Expand Up @@ -168,6 +171,9 @@ typeSupportStatuses:
- type: PushMetricExporter
status: unknown
propertyOverrides: []
- type: RandomIdGenerator
status: unknown
propertyOverrides: []
- type: Resource
status: unknown
propertyOverrides: []
Expand Down
6 changes: 6 additions & 0 deletions schema/meta_schema_language_java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ typeSupportStatuses:
- type: HttpTls
status: supported
propertyOverrides: []
- type: IdGenerator
status: unknown
propertyOverrides: []
- type: IncludeExclude
status: supported
propertyOverrides: []
Expand Down Expand Up @@ -164,6 +167,9 @@ typeSupportStatuses:
- type: PushMetricExporter
status: supported
propertyOverrides: []
- type: RandomIdGenerator
status: unknown
propertyOverrides: []
- type: Resource
status: supported
propertyOverrides: []
Expand Down
6 changes: 6 additions & 0 deletions schema/meta_schema_language_js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ typeSupportStatuses:
- type: HttpTls
status: unknown
propertyOverrides: []
- type: IdGenerator
status: unknown
propertyOverrides: []
- type: IncludeExclude
status: unknown
propertyOverrides: []
Expand Down Expand Up @@ -146,6 +149,9 @@ typeSupportStatuses:
- type: PushMetricExporter
status: unknown
propertyOverrides: []
- type: RandomIdGenerator
status: unknown
propertyOverrides: []
- type: Resource
status: unknown
propertyOverrides: []
Expand Down
6 changes: 6 additions & 0 deletions schema/meta_schema_language_php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ typeSupportStatuses:
- type: HttpTls
status: ignored
propertyOverrides: []
- type: IdGenerator
status: unknown
propertyOverrides: []
- type: IncludeExclude
status: supported
propertyOverrides: []
Expand Down Expand Up @@ -178,6 +181,9 @@ typeSupportStatuses:
- type: PushMetricExporter
status: supported
propertyOverrides: []
- type: RandomIdGenerator
status: unknown
propertyOverrides: []
- type: Resource
status: supported
propertyOverrides: []
Expand Down
24 changes: 24 additions & 0 deletions schema/tracer_provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ properties:
description: |
Configure the sampler.
defaultBehavior: parent based sampler with a root of always_on is used
id_generator:
$ref: "#/$defs/IdGenerator"
description: |
Configure the trace and span ID generator.
defaultBehavior: an ID generator which randomly generates TraceIds and SpanIds is used
Comment thread
MikeGoldsmith marked this conversation as resolved.
Outdated
tracer_configurator/development:
$ref: "#/$defs/ExperimentalTracerConfigurator"
description: |
Expand Down Expand Up @@ -396,6 +401,25 @@ $defs:
$ref: "#/$defs/ExperimentalComposableRuleBasedSampler"
description: Configure sampler to be rule_based.
defaultBehavior: ignore
IdGenerator:
type: object
additionalProperties:
type:
- object
- "null"
minProperties: 1
maxProperties: 1
properties:
random:
$ref: "#/$defs/RandomIdGenerator"
description: Configure the ID generator to randomly generate TraceIds and SpanIds (spec default).
defaultBehavior: ignore
isSdkExtensionPlugin: true
RandomIdGenerator:
type:
- object
- "null"
additionalProperties: false
SimpleSpanProcessor:
type: object
additionalProperties: false
Expand Down
12 changes: 12 additions & 0 deletions snippets/IdGenerator_custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
file_format: "1.0"

tracer_provider:
processors:
- simple:
exporter:
console:
id_generator:
# SNIPPET_START
# configure a custom ID generator registered via PluginComponentProvider
my_custom_id_generator:
property: value
Loading