Skip to content

Commit 4d1f6b2

Browse files
committed
fix(buildSrc): restore agent SPI service discovery after gradle-plugins upgrade
Shadow service-file merging was incomplete for isolated agent classes, so metric exporter providers were not discoverable from the inst service path during instrumentation tests. That caused Javaagent startup failures (otel.metrics.exporter=otlp “exporter not found”) and cascaded test failures across methods, micrometer, azure-functions, and applicationinsights-web modules. Update shadow conventions to merge service descriptors into both META-INF/services and inst/META-INF/services, restoring provider loading for the agent classloader and passing unit tests.
1 parent 46aa655 commit 4d1f6b2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ plugins {
55
}
66

77
tasks.withType<ShadowJar>().configureEach {
8-
mergeServiceFiles {
9-
include("META-INF/services/**")
10-
include("inst/META-INF/services/**")
11-
}
8+
mergeServiceFiles()
9+
mergeServiceFiles("inst/META-INF/services")
1210

1311
exclude("**/module-info.class")
1412
exclude("META-INF/*.SF")

0 commit comments

Comments
 (0)