Skip to content

Commit c3eda2e

Browse files
committed
Merge branch 'main' into feat-add-testerror
2 parents 62a88ac + 7ae8069 commit c3eda2e

File tree

133 files changed

+2762
-2151
lines changed

Some content is hidden

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

133 files changed

+2762
-2151
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash -e
2+
3+
# shellcheck disable=SC2044
4+
for file in $(find instrumentation instrumentation-api -name '*Test.java'); do
5+
echo "Processing $file"
6+
7+
# stable semconv
8+
9+
negative_lookbehind='(?<!import static io.opentelemetry.semconv.)'
10+
11+
for class in "ClientAttributes" "ErrorAttributes" "ExceptionAttributes" "HttpAttributes" "JvmAttributes" "NetworkAttributes" "OtelAttributes" "ServerAttributes" "ServiceAttributes" "TelemetryAttributes" "UrlAttributes" "UserAgentAttributes"; do
12+
for attr in $(perl -ne "print \"\$1\n\" if /$negative_lookbehind$class\.([A-Z][A-Z][A-Z_]*)/" "$file" | sort -u); do
13+
perl -i -pe "s/$negative_lookbehind$class\.$attr/$attr/" "$file"
14+
sed -i "0,/^import/{s/^import/import static io.opentelemetry.semconv.$class.$attr;\nimport/}" "$file"
15+
done
16+
done
17+
18+
# incubating semconv
19+
20+
negative_lookbehind='(?<!import static io.opentelemetry.semconv.incubating.)'
21+
22+
for class in "AwsIncubatingAttributes" "DbIncubatingAttributes" "HttpIncubatingAttributes" "MessagingIncubatingAttributes"; do
23+
for attr in $(perl -ne "print \"\$1\n\" if /$negative_lookbehind$class\.([A-Z][A-Z][A-Z_]*)/" "$file" | sort -u); do
24+
perl -i -pe "s/$negative_lookbehind$class\.$attr/$attr/" "$file"
25+
sed -i "0,/^import/{s/^import/import static io.opentelemetry.semconv.incubating.$class.$attr;\nimport/}" "$file"
26+
done
27+
done
28+
done
29+
30+
./gradlew spotlessApply

.github/workflows/issue-management-stale-action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
21-
# TODO (trask) update back to 7 days after end of year break
22-
days-before-stale: 21
21+
days-before-stale: 7
2322
days-before-close: 7
2423
only-labels: "needs author feedback"
2524
stale-issue-label: stale

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
- `internal-application-logging` --> `internal-application-logger`
1010
- `javalin-5` -> `javalin-5.0`
1111
- `pulsar-2.8.0` -> `pulsar-2.8`
12+
- In preparation for stabilizing HTTP library instrumentation soon:
13+
- `setCaptured*Headers(List)` methods in `*TelemetryBuilder` classes were changed to
14+
`setCaptured*Headers(Collection)`
15+
([#12901](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12901))
16+
- `setKnownMethods(Set)` methods in `*TelemetryBuilder` classes were changed to
17+
`setKnownMethods(Collection)`
18+
([#12902](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12902))
1219

1320
## Version 2.11.0 (2024-12-23)
1421

@@ -97,7 +104,6 @@ In preparation for stabilizing HTTP library instrumentation soon:
97104
([#12883](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12883))
98105
- Add close to fix CWE-404
99106
([#12908](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12908))
100-
>>>>>>> upstream/main
101107

102108
## Version 2.10.0 (2024-11-13)
103109

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ https://gradle.com/s/ila4qwp5lcf5s
8787
```
8888

8989
Opening the build scan link can sometimes take several seconds (it's a large build), but it
90-
typically makes it a lot clearer what's failing.
90+
typically makes it a lot clearer what's failing. Sometimes there will be several build scans in a
91+
log, so look for one that follows the "BUILD FAILED" message.
9192

9293
You can also try the "Explain error" button at the top of the GitHub Actions page,
9394
which often does a reasonable job of parsing the long build log and displaying the important part.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
161161
Triagers ([@open-telemetry/java-instrumentation-triagers](https://github.com/orgs/open-telemetry/teams/java-instrumentation-triagers)):
162162

163163
- [Jonas Kunz](https://github.com/JonasKunz), Elastic
164-
- [Steve Rao](https://github.com/steverao), Alibaba
165164
- [Sylvain Juge](https://github.com/SylvainJuge), Elastic
166165

167166
Approvers ([@open-telemetry/java-instrumentation-approvers](https://github.com/orgs/open-telemetry/teams/java-instrumentation-approvers)):
@@ -172,6 +171,7 @@ Approvers ([@open-telemetry/java-instrumentation-approvers](https://github.com/o
172171
- [Jay DeLuca](https://github.com/jaydeluca)
173172
- [Jean Bisutti](https://github.com/jeanbisutti), Microsoft
174173
- [John Watson](https://github.com/jkwatson), Cloudera
174+
- [Steve Rao](https://github.com/steverao), Alibaba
175175

176176
Maintainers ([@open-telemetry/java-instrumentation-maintainers](https://github.com/orgs/open-telemetry/teams/java-instrumentation-maintainers)):
177177

benchmark-overhead/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("java")
3-
id("com.diffplug.spotless") version "6.25.0"
3+
id("com.diffplug.spotless") version "7.0.1"
44
}
55

66
spotless {

conventions/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
`kotlin-dsl`
33
// When updating, update below in dependencies too
4-
id("com.diffplug.spotless") version "6.25.0"
4+
id("com.diffplug.spotless") version "7.0.1"
55
}
66

77
spotless {
@@ -54,25 +54,25 @@ dependencies {
5454
implementation("org.apache.maven:maven-aether-provider:3.3.9")
5555

5656
// When updating, update above in plugins too
57-
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
57+
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.1")
5858
implementation("com.google.guava:guava:33.4.0-jre")
5959
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
6060
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.5")
6161
implementation("org.apache.httpcomponents:httpclient:4.5.14")
6262
implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:3.19")
63-
implementation("org.owasp:dependency-check-gradle:11.1.1")
63+
implementation("org.owasp:dependency-check-gradle:12.0.0")
6464
implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.2")
6565
implementation("org.spdx:spdx-gradle-plugin:0.8.0")
6666
// When updating, also update dependencyManagement/build.gradle.kts
6767
implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.15.11")
6868
implementation("gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.6")
6969
implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.2")
7070
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.1.0")
71-
implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.1.0")
71+
implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.2.0")
7272
implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.5")
7373

7474
testImplementation(enforcedPlatform("org.junit:junit-bom:5.11.4"))
7575
testImplementation("org.junit.jupiter:junit-jupiter-api")
7676
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
77-
testImplementation("org.assertj:assertj-core:3.27.0")
77+
testImplementation("org.assertj:assertj-core:3.27.2")
7878
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ spotless {
7676
// also very hard to find out where this happens
7777
"ktlint_standard_wrapping" to "disabled",
7878
// we use variable names like v1_10Deps
79-
"ktlint_standard_property-naming" to "disabled"
79+
"ktlint_standard_property-naming" to "disabled",
80+
// prevent moving comment to next line in latestDepTestLibrary("xxx") { // see xxx module
81+
"ktlint_standard_function-literal" to "disabled"
8082
)
8183
)
8284
}
@@ -97,7 +99,7 @@ if (project == rootProject) {
9799
"**/*.dockerfile",
98100
"**/gradle.properties"
99101
)
100-
indentWithSpaces()
102+
leadingTabsToSpaces()
101103
trimTrailingWhitespace()
102104
endWithNewline()
103105
}

dependencyManagement/build.gradle.kts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ val dependencyVersions = hashMapOf<String, String>()
88
rootProject.extra["versions"] = dependencyVersions
99

1010
// this line is managed by .github/scripts/update-sdk-version.sh
11-
val otelSdkVersion = "1.45.0"
11+
val otelSdkVersion = "1.46.0"
1212
val otelContribVersion = "1.42.0-alpha"
1313
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
1414

@@ -28,14 +28,14 @@ val groovyVersion = "4.0.24"
2828

2929
val DEPENDENCY_BOMS = listOf(
3030
"com.fasterxml.jackson:jackson-bom:2.18.2",
31-
"com.squareup.okio:okio-bom:3.9.1", // see https://github.com/open-telemetry/opentelemetry-java/issues/5637
31+
"com.squareup.okio:okio-bom:3.10.2", // see https://github.com/open-telemetry/opentelemetry-java/issues/5637
3232
"com.google.guava:guava-bom:33.4.0-jre",
3333
"org.apache.groovy:groovy-bom:${groovyVersion}",
3434
"io.opentelemetry:opentelemetry-bom:${otelSdkVersion}",
3535
"io.opentelemetry:opentelemetry-bom-alpha:${otelSdkAlphaVersion}",
3636
"org.junit:junit-bom:5.11.4",
3737
"org.testcontainers:testcontainers-bom:1.20.4",
38-
"org.spockframework:spock-bom:2.4-M4-groovy-4.0"
38+
"org.spockframework:spock-bom:2.4-M5-groovy-4.0"
3939
)
4040

4141
val autoServiceVersion = "1.1.1"
@@ -87,10 +87,10 @@ val DEPENDENCIES = listOf(
8787
"com.github.stefanbirkner:system-lambda:1.2.1",
8888
"com.github.stefanbirkner:system-rules:1.19.0",
8989
"uk.org.webcompere:system-stubs-jupiter:2.0.3",
90-
"com.uber.nullaway:nullaway:0.12.2",
91-
"commons-beanutils:commons-beanutils:1.9.4",
90+
"com.uber.nullaway:nullaway:0.12.3",
91+
"commons-beanutils:commons-beanutils:1.10.0",
9292
"commons-cli:commons-cli:1.9.0",
93-
"commons-codec:commons-codec:1.17.1",
93+
"commons-codec:commons-codec:1.17.2",
9494
"commons-collections:commons-collections:3.2.2",
9595
"commons-digester:commons-digester:2.1",
9696
"commons-fileupload:commons-fileupload:1.5",
@@ -103,9 +103,9 @@ val DEPENDENCIES = listOf(
103103
"io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:${otelContribVersion}",
104104
"io.opentelemetry.contrib:opentelemetry-gcp-resources:${otelContribVersion}",
105105
"io.opentelemetry.contrib:opentelemetry-baggage-processor:${otelContribVersion}",
106-
"io.opentelemetry.proto:opentelemetry-proto:1.4.0-alpha",
106+
"io.opentelemetry.proto:opentelemetry-proto:1.5.0-alpha",
107107
"io.opentelemetry:opentelemetry-extension-annotations:1.18.0", // deprecated, no longer part of bom
108-
"org.assertj:assertj-core:3.27.0",
108+
"org.assertj:assertj-core:3.27.2",
109109
"org.awaitility:awaitility:4.2.2",
110110
"com.google.code.findbugs:annotations:3.0.1u2",
111111
"com.google.code.findbugs:jsr305:3.0.2",
@@ -116,7 +116,7 @@ val DEPENDENCIES = listOf(
116116
"org.objenesis:objenesis:3.4",
117117
"javax.validation:validation-api:2.0.1.Final",
118118
"org.snakeyaml:snakeyaml-engine:2.8",
119-
"org.elasticmq:elasticmq-rest-sqs_2.13:1.6.10"
119+
"org.elasticmq:elasticmq-rest-sqs_2.13:1.6.11"
120120
)
121121

122122
javaPlatform {

docs/contributing/debugging.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
Debugging javaagent instrumentation can be a challenging task since instrumentation
44
code is directly inlined into target classes.
55

6+
## Indy compatible instrumentation
7+
8+
For instrumentation that has been migrated to use the
9+
[invokedynamic based instrumentation mechanism](https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8999),
10+
you can leverage breakpoints and standard debugging strategies by adding `-PtestIndy=true` to the
11+
gradle command when running tests:
12+
13+
```
14+
./gradlew -PtestIndy=true :instrumentation:<INSTRUMENTATION_NAME>:test
15+
```
16+
617
## Advice methods
718

819
Breakpoints do not work in advice methods, because their code is directly inlined

0 commit comments

Comments
 (0)