Skip to content

Commit 1d65e6f

Browse files
authored
Merge branch 'main' into code-review-agent
2 parents f1ff617 + fc2811b commit 1d65e6f

2,042 files changed

Lines changed: 15743 additions & 14144 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.

.fossa.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,6 @@ targets:
346346
- type: gradle
347347
path: ./
348348
target: ':instrumentation:armeria:armeria-grpc-1.14:javaagent'
349-
- type: gradle
350-
path: ./
351-
target: ':instrumentation:async-http-client:async-http-client-1-common:javaagent'
352349
- type: gradle
353350
path: ./
354351
target: ':instrumentation:async-http-client:async-http-client-1.8:javaagent'
@@ -358,6 +355,9 @@ targets:
358355
- type: gradle
359356
path: ./
360357
target: ':instrumentation:async-http-client:async-http-client-2.0:javaagent'
358+
- type: gradle
359+
path: ./
360+
target: ':instrumentation:async-http-client:async-http-client-common-1.8:javaagent'
361361
- type: gradle
362362
path: ./
363363
target: ':instrumentation:aws-lambda:aws-lambda-core-1.0:javaagent'
@@ -427,9 +427,6 @@ targets:
427427
- type: gradle
428428
path: ./
429429
target: ':instrumentation:clickhouse:clickhouse-client-v2-0.8:javaagent'
430-
- type: gradle
431-
path: ./
432-
target: ':instrumentation:couchbase:couchbase-2-common:javaagent'
433430
- type: gradle
434431
path: ./
435432
target: ':instrumentation:couchbase:couchbase-2.0:javaagent'
@@ -448,6 +445,9 @@ targets:
448445
- type: gradle
449446
path: ./
450447
target: ':instrumentation:couchbase:couchbase-3.4:javaagent'
448+
- type: gradle
449+
path: ./
450+
target: ':instrumentation:couchbase:couchbase-common-2.0:javaagent'
451451
- type: gradle
452452
path: ./
453453
target: ':instrumentation:dropwizard:dropwizard-metrics-4.0:javaagent'
@@ -630,10 +630,10 @@ targets:
630630
target: ':instrumentation:jms:jms-common:javaagent'
631631
- type: gradle
632632
path: ./
633-
target: ':instrumentation:jsf:jsf-jakarta-common:javaagent'
633+
target: ':instrumentation:jsf:jsf-common-jakarta:javaagent'
634634
- type: gradle
635635
path: ./
636-
target: ':instrumentation:jsf:jsf-javax-common:javaagent'
636+
target: ':instrumentation:jsf:jsf-common-javax:javaagent'
637637
- type: gradle
638638
path: ./
639639
target: ':instrumentation:jsf:jsf-mojarra-1.2:javaagent'
@@ -904,18 +904,6 @@ targets:
904904
- type: gradle
905905
path: ./
906906
target: ':instrumentation:rocketmq:rocketmq-client-5.0:javaagent'
907-
- type: gradle
908-
path: ./
909-
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java17:javaagent'
910-
- type: gradle
911-
path: ./
912-
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java17:library'
913-
- type: gradle
914-
path: ./
915-
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java8:javaagent'
916-
- type: gradle
917-
path: ./
918-
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java8:library'
919907
- type: gradle
920908
path: ./
921909
target: ':instrumentation:rxjava:rxjava-1.0:library'
@@ -1092,7 +1080,7 @@ targets:
10921080
target: ':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.1:javaagent'
10931081
- type: gradle
10941082
path: ./
1095-
target: ':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-common:javaagent'
1083+
target: ':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-common-3.0:javaagent'
10961084
- type: gradle
10971085
path: ./
10981086
target: ':instrumentation:jaxrs:jaxrs-3.0:jaxrs-3.0-annotations:javaagent'

.github/agents/code-review-and-fix.agent.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ Auto-fix boundaries:
233233
readers/writers/streams/response bodies).
234234
Do not apply this conversion in non-JUnit helper methods, `@BeforeAll`, or shared
235235
setup code.
236+
- class-scoped resources created in `@BeforeAll` or other shared setup — prefer
237+
`AutoCleanupExtension` with `deferAfterAll(...)` over nested `@AfterAll` cleanup
238+
chains. Do not introduce or keep `AutoCleanupExtension` solely for a single
239+
`deferAfterAll(...)` call — use a plain `@AfterAll` instead.
236240
- `hasAttributesSatisfying(...)` calls in test assertions — replace with
237241
`hasAttributesSatisfyingExactly(...)` because it is more precise (the non-exact
238242
variant silently ignores unexpected attributes)
@@ -301,6 +305,12 @@ Auto-fix boundaries:
301305
add the correctly named/shaped method with the implementation, deprecate the old method
302306
to delegate to the new one, and add a `@deprecated` Javadoc tag naming the replacement.
303307
For stable modules, annotate instead: the fix requires a broader compatibility decision.
308+
**Exception — javaagent modules**: javaagent modules (Gradle path ends with `:javaagent`,
309+
including shared `-common` javaagent modules) are bundled into the agent jar and are not
310+
a public API. Do **not** apply a deprecation cycle; rename or change the API directly
311+
and update all in-repo callers in the same commit. A deprecation cycle is only required
312+
for non-stable modules whose artifacts are published for external consumption (e.g.,
313+
`:library`, `:testing`, `instrumentation-api*`).
304314
- Do not auto-fix (report in the final output instead):
305315
- missing `testExperimental` task — when experimental flags are set unconditionally
306316
on all test tasks instead of being isolated in a dedicated task

.github/agents/draft-release-notes.agent.md

Lines changed: 0 additions & 122 deletions
This file was deleted.

.github/agents/knowledge/api-deprecation-policy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ The CHANGELOG uses distinct headings to distinguish:
1818
- `⚠️ Breaking changes to non-stable APIs` — alpha/non-stable modules (routine)
1919
- `⚠️ Breaking Changes` — stable module changes (rare, requires strong justification)
2020

21+
### Javaagent modules are not a public API
22+
23+
Javaagent modules (Gradle path ends with `:javaagent`, including shared `-common` javaagent
24+
modules) are bundled into the agent jar and are **not** published for external consumption.
25+
Do **not** apply a deprecation cycle to symbols in javaagent modules — rename or change the
26+
API directly and update all in-repo callers in the same commit. The deprecate-then-remove
27+
cycle described below applies only to non-stable modules whose artifacts are published
28+
(e.g., `:library`, `:testing`, `instrumentation-api*`).
29+
2130
## The Deprecate-Then-Remove Cycle
2231

2332
### Alpha (non-stable) modules

.github/agents/knowledge/config-property-stability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ must be communicated through:
6767
(`otel.instrumentation.…`) since that is what most users configure today:
6868

6969
```java
70-
boolean captureEventName = config.getBoolean("capture_event_name/development", false);
71-
if (captureEventName) {
70+
boolean oldSetting = config.getBoolean("old_setting/development", false);
71+
if (oldSetting) {
7272
logger.warning(
73-
"The otel.instrumentation.logback-appender.experimental.capture-event-name setting is"
73+
"The otel.instrumentation.<module>.experimental.old-setting setting is"
7474
+ " deprecated and will be removed in a future version.");
7575
}
7676
```

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ When a "Knowledge File" is listed, load it from `knowledge/` before reviewing th
2727
| Semconv | Dual semconv testing | `SemconvStability`, `maybeStable`, semconv Gradle tasks | `testing-semconv-stability.md` |
2828
| Testing | General test patterns | Test files in scope — assertion style, test method signatures and throws clauses, resource cleanup, attribute assertions | `testing-general-patterns.md` |
2929
| Testing | Experimental flag tests | `testExperimental`, experimental attribute assertions, `experimental` flags in JVM args or system properties | `testing-experimental-flags.md` |
30+
| Testing | Flag-gated / mode-dependent assertion shape (experimental, `testLatestDeps`, semconv) — shared accessor (`testLatestDeps()`, `emitStable*Semconv()`) or `EXPERIMENTAL_ATTRIBUTES` constant, inline ternary with `null` for "absent" | Test classes branching on `EXPERIMENTAL_ATTRIBUTES`, `testLatestDeps()`, or `emitOld*`/`emitStable*` | `testing-general-patterns.md` |
3031
| Library | TelemetryBuilder/getter/setter patterns | Library instrumentation classes | `library-patterns.md` |
3132
| API | Deprecation and breaking-change policy | Public API changes | `api-deprecation-policy.md` |
3233
| Config | Config property stability/renames/removals | `otel.instrumentation.*` property changes, `DeclarativeConfigUtil` or `ConfigProperties` usage | `config-property-stability.md` |
@@ -76,7 +77,10 @@ Do not flag the following patterns (common false positives):
7677

7778
- FQCN is acceptable when class-name collision makes import impossible.
7879
- Do not claim that a Java non-capturing lambda or method reference allocates per
79-
call. On HotSpot / OpenJDK 8+, these are cached at the call site.
80+
call. On HotSpot / OpenJDK 8+, these are cached at the `invokedynamic` call site.
81+
Do not suggest hoisting such a lambda into a `private static final` field for
82+
allocation/performance reasons — it is pure noise. If a PR makes that hoist,
83+
flag it and recommend reverting to the in-line lambda.
8084

8185
## [Style] Visibility modifiers
8286

@@ -86,9 +90,17 @@ still allows the code to function correctly.
8690
**Exception — Single public class**: If a module has only one public class then don't change it to
8791
package-private. Javadoc task fails when module has no public classes.**
8892

89-
**Exception — Used from advice**: All classes and methods used from methods annotated with
90-
`@Advice.OnMethodEnter` or `@Advice.OnMethodExit` must be public. These methods are inlined into
91-
transformed classes and must be accessible from those classes, which may be in different packages.
93+
**Exception — Directly referenced from advice**: Classes and methods that are _directly_
94+
referenced from methods annotated with `@Advice.OnMethodEnter` or `@Advice.OnMethodExit` must be
95+
public, since the advice may be applied to classes in other packages.
96+
97+
This applies only to **direct** references in the advice methods, not transitive ones. Helpers
98+
reached only from inside another helper called by the advice (for example, a same-package
99+
`*Singletons` accessor invoked from inside `AdviceScope.start()`) can keep package-private
100+
visibility. A source-level `inline = false` on the advice annotation is not a reason to widen
101+
visibility — the agent forcibly overrides the `inline` attribute at runtime based on the
102+
configured indy mode, so the source value does not determine how the advice is dispatched.
103+
Reason about visibility from "what does the advice method directly reference?".
92104

93105
## [Style] `@SuppressWarnings` Usage
94106

0 commit comments

Comments
 (0)