Skip to content

Convert last AgentInstrumentationConfig usages#15752

Merged
trask merged 1 commit intoopen-telemetry:mainfrom
trask:delete-agent-instrumentation-config
Dec 31, 2025
Merged

Convert last AgentInstrumentationConfig usages#15752
trask merged 1 commit intoopen-telemetry:mainfrom
trask:delete-agent-instrumentation-config

Conversation

@trask
Copy link
Copy Markdown
Member

@trask trask commented Dec 30, 2025

No description provided.

Comment on lines -391 to +395
String experimentalOverride =
ConfigPropertiesUtil.getString(
"otel.instrumentation.experimental.span-suppression-strategy");
String result =
commonConfig.getString(
"span_suppression_strategy/development",
experimentalOverride == null ? "" : experimentalOverride);
ConfigPropertiesUtil.getString(
"otel.instrumentation.experimental.span-suppression-strategy", ""));
Copy link
Copy Markdown
Member Author

@trask trask Dec 30, 2025

Choose a reason for hiding this comment

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

this is just a small refactoring to follow newly established pattern

Comment on lines -294 to -301
private static void copyNecessaryConfigToSystemProperties(ConfigProperties config) {
for (String property : asList("otel.instrumentation.experimental.span-suppression-strategy")) {
String value = config.getString(property);
if (value != null) {
System.setProperty(property, value);
}
}
}
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.

this isn't needed anymore now that span_suppression_strategy is read first from declarative config API

private static final boolean REFLECTION_ENABLED =
AgentInstrumentationConfig.get()
.getBoolean("otel.instrumentation.internal-reflection.enabled", true);
ConfigPropertiesUtil.getBoolean("otel.instrumentation.internal-reflection.enabled", true);
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.

this is too early to use DeclarativeConfigUtil

@trask trask marked this pull request as ready for review December 30, 2025 19:51
@trask trask requested a review from a team as a code owner December 30, 2025 19:51
@trask trask merged commit fbd6de8 into open-telemetry:main Dec 31, 2025
85 checks passed
@trask trask deleted the delete-agent-instrumentation-config branch December 31, 2025 16:16
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.

2 participants