Skip to content

Commit e7bc7bd

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-instrumentation into indy-rmi
2 parents 66cc354 + 93dd4c8 commit e7bc7bd

File tree

163 files changed

+2385
-1663
lines changed

Some content is hidden

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

163 files changed

+2385
-1663
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

RELEASING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ as the last step, which publishes a snapshot build to
1212

1313
## Release cadence
1414

15-
This repository roughly targets monthly minor releases from the `main` branch on the Thursday after
16-
the second Monday of the month (roughly a couple of days after the monthly minor release of
17-
[opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib)).
15+
This repository roughly targets monthly minor releases from the `main` branch on the Wednesday after
16+
the second Monday of the month (roughly a few days after the monthly minor release of
17+
[opentelemetry-java](https://github.com/open-telemetry/opentelemetry-java)).
1818

1919
## Preparing a new major or minor release
2020

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.2"
44
}
55

66
spotless {

conventions/build.gradle.kts

Lines changed: 4 additions & 4 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.2"
55
}
66

77
spotless {
@@ -54,21 +54,21 @@ 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.2")
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"))

conventions/src/main/kotlin/io.opentelemetry.instrumentation.javaagent-testing.gradle.kts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ class JavaagentTestArgumentsProvider(
9393
"-Dio.opentelemetry.javaagent.slf4j.simpleLogger.log.io.grpc.internal.ServerImplBuilder=INFO",
9494
"-Dio.opentelemetry.javaagent.slf4j.simpleLogger.log.io.grpc.internal.ManagedChannelImplBuilder=INFO",
9595
"-Dio.opentelemetry.javaagent.slf4j.simpleLogger.log.io.perfmark.PerfMark=INFO",
96-
"-Dio.opentelemetry.javaagent.slf4j.simpleLogger.log.io.grpc.Context=INFO"
96+
"-Dio.opentelemetry.javaagent.slf4j.simpleLogger.log.io.grpc.Context=INFO",
97+
"-Dotel.java.experimental.span-attributes.copy-from-baggage.include=test-baggage-key-1,test-baggage-key-2"
9798
)
9899
}
99100

@@ -108,12 +109,22 @@ afterEvaluate {
108109
// this dependency.
109110
dependsOn(agentForTesting.buildDependencies)
110111

111-
jvmArgumentProviders.add(JavaagentTestArgumentsProvider(agentShadowJar, shadowJar.archiveFile.get().asFile))
112+
jvmArgumentProviders.add(
113+
JavaagentTestArgumentsProvider(
114+
agentShadowJar,
115+
shadowJar.archiveFile.get().asFile
116+
)
117+
)
112118

113119
// We do fine-grained filtering of the classpath of this codebase's sources since Gradle's
114120
// configurations will include transitive dependencies as well, which tests do often need.
115121
classpath = classpath.filter {
116-
if (file(layout.buildDirectory.dir("resources/main")).equals(it) || file(layout.buildDirectory.dir("classes/java/main")).equals(it)) {
122+
if (file(layout.buildDirectory.dir("resources/main")).equals(it) || file(
123+
layout.buildDirectory.dir(
124+
"classes/java/main"
125+
)
126+
).equals(it)
127+
) {
117128
// The sources are packaged into the testing jar, so we need to exclude them from the test
118129
// classpath, which automatically inherits them, to ensure our shaded versions are used.
119130
return@filter false

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

Lines changed: 1 addition & 1 deletion
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.116.Final", false)
146+
belongsTo("io.netty:netty-bom:4.1.117.Final", false)
147147
} else if (id.version.startsWith("4.0.")) {
148148
belongsTo("io.netty:netty-bom:4.0.56.Final", false)
149149
}

0 commit comments

Comments
 (0)