Skip to content

Migrate CommonConfig to Declarative Configuration API#15707

Merged
trask merged 7 commits intoopen-telemetry:mainfrom
trask:common-config
Dec 22, 2025
Merged

Migrate CommonConfig to Declarative Configuration API#15707
trask merged 7 commits intoopen-telemetry:mainfrom
trask:common-config

Conversation

@trask
Copy link
Copy Markdown
Member

@trask trask commented Dec 21, 2025

No description provided.

@github-actions github-actions Bot added the test native This label can be applied to PRs to trigger them to run native tests label Dec 21, 2025
"otel.instrumentation.common.logging.trace-flags", LoggingContextConstants.TRACE_FLAGS);
}

public CommonConfig(OpenTelemetry openTelemetry) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Spring boot starter is still using the other constructor for now

"otel.instrumentation.common.enduser.scope.enabled", false);
}

EnduserConfig(ExtendedDeclarativeConfigProperties commonConfig) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Spring boot starter is still using the other constructor for now

Comment on lines +32 to +36
config.getBoolean("otel.instrumentation.http.client.emit-experimental-telemetry", false);
if (!urlTemplateEnabled || !config.isDeclarative()) {
commonConfig
.get("http")
.get("client")
.getBoolean("emit_experimental_telemetry/development", false);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

moving common http properties under .java.common. node

Comment on lines 39 to 43
}
DeclarativeConfigProperties configuration =
config.getDeclarativeConfig("http").getStructured("client", empty());
configuration
commonConfig
.get("http")
.get("client")
.getStructuredList("url_template_rules", emptyList())
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

same here

@trask trask marked this pull request as ready for review December 22, 2025 03:47
@trask trask requested a review from a team as a code owner December 22, 2025 03:47
generalConfig
.get("http")
.get("client")
.getScalarList("request_captured_headers", String.class, new ArrayList<>());
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.

What about "request", "captured_headers"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@zeitlinger zeitlinger mentioned this pull request Dec 22, 2025
@trask trask enabled auto-merge (squash) December 22, 2025 16:30
@trask trask merged commit aa924ab into open-telemetry:main Dec 22, 2025
87 checks passed
@trask trask deleted the common-config branch December 22, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants