Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,27 @@ public final class InstrumenterBuilder<REQUEST, RESPONSE> {

private static final Logger logger = Logger.getLogger(InstrumenterBuilder.class.getName());

private static final SpanSuppressionStrategy spanSuppressionStrategy =
SpanSuppressionStrategy.fromConfig(
private static final SpanSuppressionStrategy spanSuppressionStrategy;

static {
String value =
ConfigPropertiesUtil.getString(
"otel.instrumentation.common.experimental.span-suppression-strategy");

if (value == null) {
value =
ConfigPropertiesUtil.getString(
"otel.instrumentation.experimental.span-suppression-strategy"));
"otel.instrumentation.experimental.span-suppression-strategy");

if (value != null) {
logger.warning(
"Using deprecated config: otel.instrumentation.experimental.span-suppression-strategy. "
+ "Use otel.instrumentation.common.experimental.span-suppression-strategy instead.");
}
}

spanSuppressionStrategy = SpanSuppressionStrategy.fromConfig(value);
}

final OpenTelemetry openTelemetry;
final String instrumentationName;
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/camel-2.20/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tasks {
jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")

// TODO: fix camel instrumentation so that it uses semantic attributes extractors
jvmArgs("-Dotel.instrumentation.experimental.span-suppression-strategy=span-kind")
jvmArgs("-Dotel.instrumentation.common.experimental.span-suppression-strategy=span-kind")

// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ private static void installEarlyInstrumentation(
}

private static void copyNecessaryConfigToSystemProperties(ConfigProperties config) {
for (String property : asList("otel.instrumentation.experimental.span-suppression-strategy")) {
for (String property :
asList("otel.instrumentation.common.experimental.span-suppression-strategy")) {
String value = config.getString(property);
if (value != null) {
System.setProperty(property, value);
Expand Down
Loading