Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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 @@ -52,4 +52,11 @@ tasks.withType<ShadowJar>().configureEach {

// this is for instrumentation on java.util.logging (since java.util.logging itself is shaded above)
relocate("application.java.util.logging", "java.util.logging")

// Rename SPI service files to match relocated class names
eachFile {
Copy link
Contributor

Choose a reason for hiding this comment

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

Dis some AI com up with this? If so I'd suggest you to give up on #15513

if (path.startsWith("META-INF/services/io.opentelemetry.instrumentation")) {
path = path.replace("io.opentelemetry.instrumentation", "io.opentelemetry.javaagent.shaded.instrumentation")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ tasks.withType<ShadowJar>().configureEach {

// this is for instrumentation on java.util.logging (since java.util.logging itself is shaded above)
relocate("application.java.util.logging", "java.util.logging")

// Rename SPI service files to match relocated class names
eachFile {
if (path.startsWith("META-INF/services/io.opentelemetry.instrumentation")) {
path = path.replace("io.opentelemetry.instrumentation", "io.opentelemetry.javaagent.shaded.instrumentation")
}
}
}

val compileMuzzle by tasks.registering {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ DefaultKafkaProducerFactoryCustomizer otelKafkaProducerFactoryCustomizer(
static SpringKafkaTelemetry getTelemetry(
ObjectProvider<OpenTelemetry> openTelemetryProvider,
ObjectProvider<InstrumentationConfig> configProvider) {
InstrumentationConfig config = configProvider.getObject();
return SpringKafkaTelemetry.builder(openTelemetryProvider.getObject())
.setCaptureExperimentalSpanAttributes(
configProvider
.getObject()
.getBoolean("otel.instrumentation.kafka.experimental-span-attributes", false))
config.getBoolean("otel.instrumentation.kafka.experimental-span-attributes", false))
.setMessagingReceiveInstrumentationEnabled(
config.getBoolean("otel.instrumentation.messaging.experimental.receive-telemetry.enabled", false))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.opentelemetry.javaagent.tooling.instrumentation.http.RegexUrlTemplateCustomizer
Loading