Skip to content

Commit 7c90b9a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into conditions
2 parents f306428 + fcb02fa commit 7c90b9a

449 files changed

Lines changed: 1127 additions & 2172 deletions

File tree

Some content is hidden

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

.github/agents/knowledge/general-rules.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ Do not flag the following patterns (common false positives):
7777

7878
- FQCN is acceptable when class-name collision makes import impossible.
7979

80+
## [Style] Visibility modifiers
81+
82+
Follow the principle of minimal necessary visibility. Use the most restrictive access modifier that
83+
still allows the code to function correctly.
84+
85+
**Exception — Single public class**: If a module has only one public class then don't change it to
86+
package-private. Javadoc task fails when module has no public classes.**
87+
88+
**Exception — Used from advice**: All classes and methods used from methods annotated with
89+
`@Advice.OnMethodEnter` or `@Advice.OnMethodExit` must be public. These methods are inlined into
90+
transformed classes and must be accessible from those classes, which may be in different packages.
91+
8092
## [Style] `@SuppressWarnings` Usage
8193

8294
- Method-level `@SuppressWarnings` is preferred over class-level for tighter scope, but

.github/agents/knowledge/testing-general-patterns.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@
1717
- In JUnit tests, when an `AutoCloseable` is intended to remain live for most or all of the test
1818
and only needs cleanup at test end, prefer `AutoCleanupExtension` with `deferCleanup(...)`
1919
over wrapping most of the test body in try-with-resources.
20+
- For resources created in `@BeforeAll` or other class-scoped setup, prefer
21+
`AutoCleanupExtension` with `deferAfterAll(...)` over nested `@AfterAll` cleanup
22+
chains.
2023
- Reuse an existing `cleanup` extension when one is already in scope.
2124
Otherwise, add a `@RegisterExtension` field when the deferred-cleanup pattern improves
2225
clarity or avoids wrapping most of the test body.
2326
- Keep try-with-resources for semantically scoped resources whose lifetime must end before the
2427
rest of the test continues, such as `Scope` / `Context.makeCurrent()`, Mockito
2528
`MockedStatic`, and short-lived readers, writers, streams, response bodies, or parsers.
26-
- Do not use `AutoCleanupExtension` in non-JUnit helper methods, `@BeforeAll`, or other shared
27-
setup code where cleanup is not tied to a single test method.
29+
- Keep `AutoCleanupExtension` usage scoped to JUnit-managed test classes; do not introduce it in
30+
generic helper utilities or other non-JUnit code.
31+
- In `@BeforeAll` or other shared setup code where cleanup is not tied to a single test method,
32+
use `deferAfterAll(...)` instead of `deferCleanup(...)`.
2833
- If the test intentionally closes the resource mid-test or asserts behavior around explicit
2934
close, keep the direct close or try-with-resources in the test body.
3035

.github/config/lychee.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ exclude = [
2020
'^http://code.google.com/p/concurrentlinkedhashmap$',
2121
'^https://softwareengineering.stackexchange.com/questions/29727.*',
2222
'^https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/opentelemetry/$',
23+
# url in zipkin pom files points to a non-existent location
24+
'^https://github.com/openzipkin/zipkin-reporter-java/zipkin-reporter$',
25+
'^https://github.com/openzipkin/zipkin-reporter-java/zipkin-sender-okhttp3$',
2326
# flaky links
2427
'^http://www.slf4j.org.*',
2528
'^https://logback.qos.ch/.*',

.github/scripts/instrumentations.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ readonly INSTRUMENTATIONS=(
250250
"servlet:servlet-3.0:javaagent-testing:test"
251251
"servlet:servlet-5.0:jetty12-testing:test"
252252
"spring:spring-batch-3.0:javaagent:test"
253+
"spring:spring-batch-3.0:javaagent:testExperimental"
253254
"spring:spring-data:spring-data-1.8:javaagent:test"
254255
"spring:spring-integration-4.1:javaagent:test"
255256
"spring:spring-integration-4.1:javaagent:testWithProducerInstrumentation"

dependencyManagement/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
data class DependencySet(val group: String, val version: String, val modules: List<String>)
66

77
// this line is managed by .github/scripts/update-sdk-version.sh
8-
val otelSdkVersion = "1.60.1"
8+
val otelSdkVersion = "1.61.0"
99
val otelContribVersion = "1.55.0-alpha"
1010
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
1111

@@ -37,7 +37,7 @@ val DEPENDENCY_BOMS = listOf(
3737

3838
val autoServiceVersion = "1.1.1"
3939
val autoValueVersion = "1.11.1"
40-
val errorProneVersion = "2.48.0"
40+
val errorProneVersion = "2.49.0"
4141
val byteBuddyVersion = "1.18.7"
4242
val asmVersion = "9.9.1"
4343
val jmhVersion = "1.37"
@@ -85,7 +85,7 @@ val DEPENDENCIES = listOf(
8585
"io.r2dbc:r2dbc-proxy:1.1.6.RELEASE",
8686
"ch.qos.logback:logback-classic:1.3.16", // 1.4+ requires Java 11+
8787
"uk.org.webcompere:system-stubs-jupiter:2.0.3",
88-
"com.uber.nullaway:nullaway:0.13.1",
88+
"com.uber.nullaway:nullaway:0.13.2",
8989
"commons-beanutils:commons-beanutils:1.11.0",
9090
"commons-cli:commons-cli:1.11.0",
9191
"commons-codec:commons-codec:1.21.0",

docs/instrumentation-list.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13591,6 +13591,10 @@ libraries:
1359113591
type: boolean
1359213592
default: false
1359313593
telemetry:
13594+
- when: default
13595+
spans:
13596+
- span_kind: INTERNAL
13597+
attributes: []
1359413598
- when: otel.instrumentation.spring-batch.experimental-span-attributes=true
1359513599
spans:
1359613600
- span_kind: INTERNAL

examples/distro/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ subprojects {
2727
ext {
2828
versions = [
2929
// this line is managed by .github/scripts/update-sdk-version.sh
30-
opentelemetrySdk : "1.60.1",
30+
opentelemetrySdk : "1.61.0",
3131

3232
// these lines are managed by .github/scripts/update-version.sh
3333
opentelemetryJavaagent : "2.27.0-SNAPSHOT",

examples/extension/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ version = "1.0"
2424

2525
val versions = mapOf(
2626
// this line is managed by .github/scripts/update-sdk-version.sh
27-
"opentelemetrySdk" to "1.60.1",
27+
"opentelemetrySdk" to "1.61.0",
2828

2929
// these lines are managed by .github/scripts/update-version.sh
3030
"opentelemetryJavaagent" to "2.27.0-SNAPSHOT",

gradle-plugins/src/main/kotlin/io.opentelemetry.instrumentation.muzzle-generation.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import java.net.URLConnection
12
import net.bytebuddy.ClassFileVersion
23
import net.bytebuddy.build.gradle.ByteBuddySimpleTask
34

@@ -37,6 +38,10 @@ val inputClasspath = (sourceSet.output.resourcesDir?.let { codegen.plus(project.
3738
.plus(sourceSet.output.dirs) // needed to support embedding shadowed modules into instrumentation
3839
.plus(configurations.runtimeClasspath.get())
3940

41+
// disable url connection caching to avoid java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
42+
// during byte buddy plugin discovery when muzzle jar has changed
43+
URLConnection.setDefaultUseCaches("jar", false)
44+
4045
val languageTasks = LANGUAGES.map { language ->
4146
if (fileTree("src/${sourceSet.name}/${language}").isEmpty) {
4247
return@map null
@@ -61,6 +66,7 @@ fun createLanguageTask(
6166
group = "Byte Buddy"
6267
outputs.cacheIf { true }
6368
classFileVersion = ClassFileVersion.JAVA_V8
69+
isWarnOnEmptyTypeSet = false
6470
val compileTask = compileTaskProvider.get()
6571
// this does not work for kotlin as compile task does not extend AbstractCompile
6672
if (compileTask is AbstractCompile) {

instrumentation/activej-http-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/activejhttp/ActivejHttpServerInstrumentationModule.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,16 @@
1111
import com.google.auto.service.AutoService;
1212
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1313
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
14-
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
1514
import java.util.List;
1615
import net.bytebuddy.matcher.ElementMatcher;
1716

1817
@AutoService(InstrumentationModule.class)
19-
public class ActivejHttpServerInstrumentationModule extends InstrumentationModule
20-
implements ExperimentalInstrumentationModule {
18+
public class ActivejHttpServerInstrumentationModule extends InstrumentationModule {
2119

2220
public ActivejHttpServerInstrumentationModule() {
2321
super("activej-http", "activej-http-6.0");
2422
}
2523

26-
@Override
27-
public boolean isIndyReady() {
28-
return true;
29-
}
30-
3124
@Override
3225
public List<TypeInstrumentation> typeInstrumentations() {
3326
return singletonList(new ActivejAsyncServletInstrumentation());

0 commit comments

Comments
 (0)