Skip to content

add IdGenerator definition to TracerProvider#624

Merged
codeboten merged 6 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/add-id-generator-definition
Jun 2, 2026
Merged

add IdGenerator definition to TracerProvider#624
codeboten merged 6 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/add-id-generator-definition

Conversation

@MikeGoldsmith

Copy link
Copy Markdown
Member

Summary

Adds IdGenerator to the schema as an SDK extension plugin under TracerProvider, with a single built-in random for the spec-default random TraceId/SpanId generation.

Modeled consistently with existing SDK extension plugins (Sampler, SpanExporter, SpanProcessor). Treated as stable (no /development suffix) — IdGenerator is a stable spec extension point in trace/sdk.md, and the plugin shape (name + opaque properties bag) has nothing in flux. The property is optional and falls back to the SDK's random default when omitted.

Closes #70. Unblocks opentelemetry-js#6616 and similar work in other languages (originally surfaced from opentelemetry-cpp prototyping).

Notes

  • Built-in name chosen: random (matches Java autoconfigure's OTEL_TRACES_ID_GENERATOR=random convention). The spec doesn't standardize a name.
  • RandomIdGenerator has no configuration properties — the spec doesn't define any.
  • Language status files have new types stubbed as unknown; the inline property-level status for id_generator inherits TracerProvider's overall status per the existing tooling behavior. Maintainers can add propertyOverrides in follow-up PRs.

Test plan

  • make passes (compile-schema, validate-examples, validate-snippets, fix-language-implementations, generate-markdown)
  • opentelemetry_configuration.json contains IdGenerator and RandomIdGenerator $defs
  • schema-docs.md lists IdGenerator under SDK Extension Plugins
  • IdGenerator_custom.yaml snippet validates against the compiled schema
  • Reviewer confirms random is acceptable vs. default / default_random

IdGenerator is a spec-stable SDK extension point. Model it consistently
with other SDK extension plugins (Sampler, SpanExporter, SpanProcessor),
with a single built-in `random` for the spec-default behavior.

Closes open-telemetry#70.

Assisted-by: Claude claude-opus-4-7
@MikeGoldsmith
MikeGoldsmith requested a review from a team as a code owner May 19, 2026 17:04
@MikeGoldsmith

Copy link
Copy Markdown
Member Author

ping @open-telemetry/configuration-approvers

Comment thread schema/tracer_provider.yaml Outdated

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit on the description. Thanks!

Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com>
@MikeGoldsmith

Copy link
Copy Markdown
Member Author

Thanks both 👍🏻

Assisted-by: Claude claude-opus-4-7
@codeboten
codeboten merged commit 9c5c6c4 into open-telemetry:main Jun 2, 2026
12 checks passed
pull Bot pushed a commit to MC-MAGA/opentelemetry-specification that referenced this pull request Jun 5, 2026
Declarative config added IdGenerator in
open-telemetry/opentelemetry-configuration#624

Updating the table of "Supported SDK plugin components" to reflect.
dashpole pushed a commit to dashpole/opentelemetry-specification that referenced this pull request Jun 8, 2026
Declarative config added IdGenerator in
open-telemetry/opentelemetry-configuration#624

Updating the table of "Supported SDK plugin components" to reflect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add IdGenerator in tracer_provider

3 participants