Skip to content

Commit a463e2b

Browse files
committed
Merge branch 'main' into spring-starter-logback-mdc-fix
2 parents 3277ded + dd1f892 commit a463e2b

File tree

90 files changed

+2370
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2370
-50
lines changed

.fossa.yml

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ targets:
4949
- type: gradle
5050
path: ./
5151
target: ':testing:agent-for-testing'
52+
- type: gradle
53+
path: ./
54+
target: ':instrumentation:activej-http-6.0:javaagent'
5255
- type: gradle
5356
path: ./
5457
target: ':instrumentation:alibaba-druid-1.0:javaagent'

.github/scripts/check-latest-dep-test-overrides.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# all missing version coverage should be documented in supported-libraries.md
44

55
if grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
6-
| grep -v :+\" \
6+
| grep -v -e :+\" -e :latest.release\" \
77
| grep -v "// see .* module" \
88
| grep -v "// see test suite below" \
99
| grep -v "// no longer applicable" \

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
`io.opentelemetry.instrumentation.httpclient` was deprecated in favor of the new package name
99
`io.opentelemetry.instrumentation.javahttpclient`
1010

11+
## Version 2.13.2 (2025-02-27)
12+
13+
### 🛠️ Bug fixes
14+
15+
- Backport: Fix Spring boot starter dependency resolution failure with Gradle and Java 11
16+
([#13402](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13402))
17+
1118
## Version 2.13.1 (2025-02-18)
1219

1320
### 🛠️ Bug fixes

benchmark-overhead/build.gradle.kts

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ dependencies {
2525
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
2626
testImplementation("org.jooq:joox:2.0.1")
2727
testImplementation("com.jayway.jsonpath:json-path:2.9.0")
28-
testImplementation("org.slf4j:slf4j-simple:2.0.16")
28+
testImplementation("org.slf4j:slf4j-simple:2.0.17")
2929

3030
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
3131
}
3232

3333
tasks {
3434
test {
3535
useJUnitPlatform()
36+
testLogging {
37+
exceptionFormat = TestExceptionFormat.FULL
38+
showStandardStreams = true
39+
}
3640
}
3741
}
Binary file not shown.

benchmark-overhead/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

benchmark-overhead/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

+4-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ abstract class NettyAlignmentRule : ComponentMetadataRule {
143143
with(ctx.details) {
144144
if (id.group == "io.netty" && id.name != "netty") {
145145
if (id.version.startsWith("4.1.")) {
146-
belongsTo("io.netty:netty-bom:4.1.118.Final", false)
146+
belongsTo("io.netty:netty-bom:4.1.119.Final", false)
147147
} else if (id.version.startsWith("4.0.")) {
148148
belongsTo("io.netty:netty-bom:4.0.56.Final", false)
149149
}
@@ -161,7 +161,7 @@ dependencies {
161161
compileOnly("com.google.errorprone:error_prone_annotations")
162162

163163
codenarc("org.codenarc:CodeNarc:3.6.0")
164-
codenarc(platform("org.codehaus.groovy:groovy-bom:3.0.23"))
164+
codenarc(platform("org.codehaus.groovy:groovy-bom:3.0.24"))
165165

166166
modules {
167167
// checkstyle uses the very old google-collections which causes Java 9 module conflict with
@@ -356,9 +356,10 @@ tasks.withType<Test>().configureEach {
356356
val trustStore = project(":testing-common").file("src/misc/testing-keystore.p12")
357357
// Work around payara not working when this is set for some reason.
358358
// Don't set for:
359+
// - aws-sdk as we have tests that interact with AWS and need normal trustStore
359360
// - camel as we have tests that interact with AWS and need normal trustStore
360361
// - vaadin as tests need to be able to download nodejs when not cached in ~/.vaadin/
361-
if (project.name != "jaxrs-2.0-payara-testing" && !project.path.contains("vaadin") && project.description != "camel-2-20") {
362+
if (project.name != "jaxrs-2.0-payara-testing" && !project.path.contains("vaadin") && project.description != "camel-2-20" && !project.path.contains("aws-sdk")) {
362363
jvmArgumentProviders.add(KeystoreArgumentsProvider(trustStore))
363364
}
364365

dependencyManagement/build.gradle.kts

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ val otelContribVersion = "1.44.0-alpha"
1010
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
1111

1212
// Need both BOM and groovy jars
13-
val groovyVersion = "4.0.25"
13+
val groovyVersion = "4.0.26"
1414

1515
// We don't force libraries we instrument to new versions since we compile and test against specific
1616
// old baseline versions but we do try to force those libraries' transitive dependencies to new
@@ -43,7 +43,7 @@ val byteBuddyVersion = "1.17.1"
4343
val asmVersion = "9.7.1"
4444
val jmhVersion = "1.37"
4545
val mockitoVersion = "4.11.0"
46-
val slf4jVersion = "2.0.16"
46+
val slf4jVersion = "2.0.17"
4747
val semConvVersion = "1.30.0"
4848
val semConvAlphaVersion = semConvVersion.replaceFirst("(-rc.*)?$".toRegex(), "-alpha$1")
4949

@@ -90,7 +90,7 @@ val DEPENDENCIES = listOf(
9090
"com.github.stefanbirkner:system-lambda:1.2.1",
9191
"com.github.stefanbirkner:system-rules:1.19.0",
9292
"uk.org.webcompere:system-stubs-jupiter:2.0.3",
93-
"com.uber.nullaway:nullaway:0.12.3",
93+
"com.uber.nullaway:nullaway:0.12.4",
9494
"commons-beanutils:commons-beanutils:1.10.1",
9595
"commons-cli:commons-cli:1.9.0",
9696
"commons-codec:commons-codec:1.18.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Comparing source compatibility of opentelemetry-instrumentation-annotations-2.13.2.jar against opentelemetry-instrumentation-annotations-2.13.1.jar
2+
No changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Comparing source compatibility of opentelemetry-instrumentation-api-2.13.2.jar against opentelemetry-instrumentation-api-2.13.1.jar
2+
No changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.13.2.jar against opentelemetry-spring-boot-autoconfigure-2.13.1.jar
2+
No changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Comparing source compatibility of opentelemetry-spring-boot-starter-2.13.2.jar against opentelemetry-spring-boot-starter-2.13.1.jar
2+
No changes.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-instrumentation-annotations-2.14.0-SNAPSHOT.jar against opentelemetry-instrumentation-annotations-2.13.1.jar
1+
Comparing source compatibility of opentelemetry-instrumentation-annotations-2.14.0-SNAPSHOT.jar against opentelemetry-instrumentation-annotations-2.13.2.jar
22
No changes.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-instrumentation-api-2.14.0-SNAPSHOT.jar against opentelemetry-instrumentation-api-2.13.1.jar
1+
Comparing source compatibility of opentelemetry-instrumentation-api-2.14.0-SNAPSHOT.jar against opentelemetry-instrumentation-api-2.13.2.jar
22
No changes.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.14.0-SNAPSHOT.jar against opentelemetry-spring-boot-autoconfigure-2.13.1.jar
1+
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.14.0-SNAPSHOT.jar against opentelemetry-spring-boot-autoconfigure-2.13.2.jar
22
No changes.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-spring-boot-starter-2.14.0-SNAPSHOT.jar against opentelemetry-spring-boot-starter-2.13.1.jar
1+
Comparing source compatibility of opentelemetry-spring-boot-starter-2.14.0-SNAPSHOT.jar against opentelemetry-spring-boot-starter-2.13.2.jar
22
No changes.

docs/supported-libraries.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These are the supported libraries and frameworks:
1919

2020
| Library/Framework | Auto-instrumented versions | Standalone Library Instrumentation [1] | Semantic Conventions |
2121
|---------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
22+
| [ActiveJ](https://activej.io/) | 6.0+ | N/A | [HTTP Server Spans], [HTTP Server Metrics] |
2223
| [Akka Actors](https://doc.akka.io/docs/akka/current/typed/index.html) | 2.3+ | N/A | Context propagation |
2324
| [Akka HTTP](https://doc.akka.io/docs/akka-http/current/index.html) | 10.0+ | N/A | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics], Provides `http.route` [2] |
2425
| [Alibaba Druid](https://github.com/alibaba/druid) | 1.0+ | [opentelemetry-alibaba-druid-1.0](../instrumentation/alibaba-druid-1.0/library) | [Database Pool Metrics] |
122 Bytes
Binary file not shown.

examples/distro/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

examples/distro/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

examples/distro/smoke-tests/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies {
1010
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.5.0-alpha")
1111
testImplementation("io.opentelemetry:opentelemetry-api")
1212

13-
testImplementation("ch.qos.logback:logback-classic:1.5.16")
13+
testImplementation("ch.qos.logback:logback-classic:1.5.17")
1414
}
1515

1616
tasks.test {

examples/extension/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ dependencies {
109109
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
110110
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
111111

112-
testRuntimeOnly("ch.qos.logback:logback-classic:1.5.16")
112+
testRuntimeOnly("ch.qos.logback:logback-classic:1.5.17")
113113

114114
//Otel Java instrumentation that we use and extend during integration tests
115115
otel("io.opentelemetry.javaagent:opentelemetry-javaagent:${versions.opentelemetryJavaagent}")
Binary file not shown.

examples/extension/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

examples/extension/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.
122 Bytes
Binary file not shown.

gradle-plugins/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradle-plugins/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

gradle/wrapper/gradle-wrapper.jar

122 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java

+15
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;
2121
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor;
2222
import io.opentelemetry.instrumentation.api.instrumenter.SpanStatusExtractor;
23+
import io.opentelemetry.instrumentation.api.internal.Experimental;
2324
import io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractor;
2425
import io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractorBuilder;
2526
import io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter;
@@ -177,6 +178,18 @@ public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setKnownMethods(
177178
return this;
178179
}
179180

181+
/**
182+
* Configures the instrumentation to redact sensitive URL parameters.
183+
*
184+
* @param redactQueryParameters {@code true} if the sensitive URL parameters have to be redacted.
185+
*/
186+
@CanIgnoreReturnValue
187+
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setRedactQueryParameters(
188+
boolean redactQueryParameters) {
189+
Experimental.setRedactQueryParameters(httpAttributesExtractorBuilder, redactQueryParameters);
190+
return this;
191+
}
192+
180193
/** Sets custom {@link SpanNameExtractor} via transform function. */
181194
@CanIgnoreReturnValue
182195
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setSpanNameExtractor(
@@ -225,6 +238,7 @@ public Instrumenter<REQUEST, RESPONSE> build() {
225238
.addAttributesExtractor(HttpExperimentalAttributesExtractor.create(attributesGetter))
226239
.addOperationMetrics(HttpClientExperimentalMetrics.get());
227240
}
241+
228242
builderCustomizer.accept(builder);
229243

230244
if (headerSetter != null) {
@@ -248,6 +262,7 @@ public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> configure(CommonC
248262
set(
249263
config::shouldEmitExperimentalHttpClientTelemetry,
250264
this::setEmitExperimentalHttpClientMetrics);
265+
set(config::redactQueryParameters, this::setRedactQueryParameters);
251266
return this;
252267
}
253268

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/config/internal/CommonConfig.java

+8
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public final class CommonConfig {
3131
private final boolean statementSanitizationEnabled;
3232
private final boolean emitExperimentalHttpClientTelemetry;
3333
private final boolean emitExperimentalHttpServerTelemetry;
34+
private final boolean redactQueryParameters;
3435
private final String loggingTraceIdKey;
3536
private final String loggingSpanIdKey;
3637
private final String loggingTraceFlagsKey;
@@ -57,6 +58,9 @@ public CommonConfig(InstrumentationConfig config) {
5758
config.getBoolean("otel.instrumentation.common.db-statement-sanitizer.enabled", true);
5859
emitExperimentalHttpClientTelemetry =
5960
config.getBoolean("otel.instrumentation.http.client.emit-experimental-telemetry", false);
61+
redactQueryParameters =
62+
config.getBoolean(
63+
"otel.instrumentation.http.client.experimental.redact-query-parameters", true);
6064
emitExperimentalHttpServerTelemetry =
6165
config.getBoolean("otel.instrumentation.http.server.emit-experimental-telemetry", false);
6266
enduserConfig = new EnduserConfig(config);
@@ -111,6 +115,10 @@ public boolean shouldEmitExperimentalHttpServerTelemetry() {
111115
return emitExperimentalHttpServerTelemetry;
112116
}
113117

118+
public boolean redactQueryParameters() {
119+
return redactQueryParameters;
120+
}
121+
114122
public String getTraceIdKey() {
115123
return loggingTraceIdKey;
116124
}

0 commit comments

Comments
 (0)