Skip to content

Conversation

pellared
Copy link
Member

@pellared pellared commented Sep 5, 2025

Fixes #4644

What

Make Configurator and Config SDK features optional.

See also #4648 (review)

Why

The Go SIG does not want to implement these features.

We want to implement the declarative configuration using via processors.

We are fine with the proposal given we want to implement this configuration using (internally) LogRecordProcessors. We do not want to add LoggerConfigurator into the Go Logs SDK, because we find it unnecessary as everything should be achievable using LogRecordProcessor. The experience for the end-user should remain the same.

Note that we already have:

Enabled is an operation that a LogRecordProcessor MAY implement

for languages that do not want to support Logger.Enabled via processors.

We also do not want to add TracerConfigurator and MeterConfigurator support and would rather use SpanProcessor and Views instead.

@pellared pellared changed the title Configurator support is optional Make Configurator is optional Sep 5, 2025
@pellared pellared changed the title Make Configurator is optional Make Configurator as optional feature Sep 5, 2025
@pellared pellared changed the title Make Configurator as optional feature Make Configurator SDK feature optional Sep 5, 2025
@pellared
Copy link
Member Author

pellared commented Sep 5, 2025

@open-telemetry/go-maintainers, PTAL

@pellared pellared requested a review from Copilot September 5, 2025 14:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes SDK Configurator features optional by changing requirements from MUST to SHOULD/MAY, allowing language implementations to choose alternative approaches for declarative configuration.

  • Changed TracerProvider, MeterProvider, and LoggerProvider requirements from MUST to SHOULD for computing configs
  • Added explicit MAY statements for TracerConfigurator, MeterConfigurator, and LoggerConfigurator support
  • Updated CHANGELOG.md to document these changes

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
specification/trace/sdk.md Makes TracerConfigurator optional and changes TracerProvider requirement from MUST to SHOULD
specification/metrics/sdk.md Makes MeterConfigurator optional and changes MeterProvider requirement from MUST to SHOULD
specification/logs/sdk.md Makes LoggerConfigurator optional and changes LoggerProvider requirement from MUST to SHOULD
CHANGELOG.md Documents the configurator changes as optional features

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pellared pellared changed the title Make Configurator SDK feature optional Make Configurator and Config SDK features optional Sep 11, 2025
@pellared pellared requested a review from Copilot September 11, 2025 18:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pellared pellared marked this pull request as ready for review September 11, 2025 18:27
@pellared pellared requested review from a team as code owners September 11, 2025 18:27

**Status**: [Development](../document-status.md) - The `MeterProvider` MUST
compute the relevant [MeterConfig](#meterconfig) using the
**Status**: [Development](../document-status.md) - The `MeterProvider` SHOULD
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use some other terminology to require that MeterProvider will interact with file configuration, in the case it isn't using MeterConfigurator?

Copy link
Member Author

Choose a reason for hiding this comment

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

For OTel Go it is this is the other way. File configuration module is bootstrapping the MeterProvider (et al). More: https://pkg.go.dev/go.opentelemetry.io/contrib/otelconf@v0.17.0/v0.3.0#NewSDK

@jsuereth
Copy link
Contributor

We also do not want to add TracerConfigurator and MeterConfigurator support and would rather use SpanProcessor and Views instead.

What would the specification look like for this?

I want to make sure we have a hard requirement to support configuration loading (and eventually dynamic reloading), but we need to understand what that looks like. I'd prefer to have Go SIG provide specification for what they need / how hooks will work for that somewhere in the specification.

@jack-berg
Copy link
Member

SpanProcessor cannot accomplish the same behavior as TraceConfigurator: If a SpanProcessor filters spans based on scope the trace will be broken. With TraceConfigurator, when spans with a particular scope are disabled, then traces are complete as would-be children spans are properly associated with the parent, not with the spans of the disabled scope.

@pellared
Copy link
Member Author

What would the specification look like for this?

SpanProcessor cannot accomplish the same behavior as TraceConfigurator: If a SpanProcessor filters spans based on scope the trace will be broken.

I think we should make SpanProccessor and MetricView are also capable of achieving the same functionality. Still, I am not sure if this should block this PR.

eventually dynamic reloading

I'd prefer to have Go SIG provide specification for what they need / how hooks will work for that somewhere in the specification.

This could decrease the performance of the SDK even if the feature is unused because of synchronization. Therefore, this should be an opt-in feature. The processors could offer "dynamic reloading".

@jsuereth
Copy link
Contributor

I think we should make SpanProccessor and MetricView are also capable of achieving the same functionality. Still, I am not sure if this should block this PR.

I think it's hard to approve this PR without evidence of this or updates to the specification for it.

I'd prefer to have Go SIG provide specification for what they need / how hooks will work for that somewhere in the specification.

This could decrease the performance of the SDK even if the feature is unused because of synchronization. Therefore, this should be an opt-in feature. The processors could offer "dynamic reloading".

Agreed, but I'm not suggesting we naively force reloading with architecture as-is. I'm looking at OpenTelemetry JS and their 2.0 SDK. I suspect, with the conflux of Config, Entities, OpAMP (and possibly Profiler), we may want to take some time prototyping new SDK architectures that can meet the demands of these in a performant way. Bumping just the SDK without the API is a trigger we can pull to make that happen.

Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 24, 2025
@pellared pellared removed the Stale label Sep 24, 2025
Copy link

github-actions bot commented Oct 2, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 2, 2025
@pellared pellared removed the Stale label Oct 2, 2025
@dashpole
Copy link
Contributor

dashpole commented Oct 3, 2025

@pellared I do think we need some mechanism to filter out spans without breaking traces. If you still want to go this route, I think we would need to propose an alternative way to accomplish it. But if we are doing propose alternative ways to accomplish what the Configurator does, we should probably also just replace it entirely, rather than making it an optional feature.

Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tracer|Meter|Logger]Configurator and [Tracer|Meter|Logger]Config to be optional

5 participants