Skip to content

Commit 19acb56

Browse files
committed
Merge remote-tracking branch 'upstream/main' into more-pinning
# Conflicts: # instrumentation/kubernetes-client-7.0/javaagent/build.gradle.kts # instrumentation/pekko/pekko-http-1.0/javaagent/build.gradle.kts
2 parents d8ce01b + 76875bb commit 19acb56

263 files changed

Lines changed: 4433 additions & 2234 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: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ targets:
367367
- type: gradle
368368
path: ./
369369
target: ':instrumentation:aws-lambda:aws-lambda-events-2.2:javaagent'
370-
- type: gradle
371-
path: ./
372-
target: ':instrumentation:aws-lambda:aws-lambda-events-2.2:library'
373370
- type: gradle
374371
path: ./
375372
target: ':instrumentation:aws-lambda:aws-lambda-events-3.11:library'
@@ -570,7 +567,7 @@ targets:
570567
target: ':instrumentation:jaxws:jaxws-2.0-metro-2.2:javaagent'
571568
- type: gradle
572569
path: ./
573-
target: ':instrumentation:jaxws:jaxws-common:javaagent'
570+
target: ':instrumentation:jaxws:jaxws-common-2.0:javaagent'
574571
- type: gradle
575572
path: ./
576573
target: ':instrumentation:jaxws:jaxws-jws-api-1.1:javaagent'
@@ -1053,7 +1050,7 @@ targets:
10531050
target: ':instrumentation:xxl-job:xxl-job-2.3.0:javaagent'
10541051
- type: gradle
10551052
path: ./
1056-
target: ':instrumentation:xxl-job:xxl-job-common:javaagent'
1053+
target: ':instrumentation:xxl-job:xxl-job-common-1.9.2:javaagent'
10571054
- type: gradle
10581055
path: ./
10591056
target: ':instrumentation:zio:zio-2.0:javaagent'

.github/agents/knowledge/gradle-conventions.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,20 +266,27 @@ These system properties support the metadata collection pipeline. They are not r
266266
test correctness and are being added as a separate migration — **do not add them during
267267
review**. Only verify correctness when they are already present.
268268

269+
Do not add `collectMetadata` or `metadataConfig` to `javaagent-unit-tests` projects. These are
270+
unit tests, and metadata collection should not run there.
271+
269272
| Property | Type | Value |
270273
| --- | --- | --- |
271274
| `collectMetadata` | System property | Pass-through of `otelProps.collectMetadata`; defaults to `false` |
272275
| `metadataConfig` | System property | A single `key=value` string describing the non-default configuration active during this test run |
273276

274277
When already present, verify:
275278

279+
- `metadataConfig` is only used in files that also configure `collectMetadata`. A lone
280+
`metadataConfig` does not enable collection and should be removed, not added as a partial
281+
metadata migration.
276282
- `collectMetadata` is in `tasks.test` for single-test-task modules, or in
277283
`withType<Test>().configureEach` for modules that explicitly register additional `Test`
278284
tasks via `by registering(Test::class)` (`latestDepTest` does not count) — never on
279285
individual tasks. Do not use
280286
`withType<Test>().configureEach { ... }` in single-test-task modules.
281-
- `metadataConfig` is on each non-default task. It may also appear on the default `test`
282-
task when that task itself runs with non-default `jvmArgs` (e.g., an experimental flag
283-
enabled module-wide via `withType<Test>().configureEach { jvmArgs(...) }`); in that case
284-
the `metadataConfig` value should describe those non-default jvmArgs.
287+
- `metadataConfig` is on each non-default task that participates in metadata collection. It may
288+
also appear on the default `test` task when that task participates in metadata collection and
289+
itself runs with non-default `jvmArgs` (e.g., an experimental flag enabled module-wide via
290+
`withType<Test>().configureEach { jvmArgs(...) }`); in that case the `metadataConfig` value
291+
should describe those non-default jvmArgs.
285292
- The `metadataConfig` value matches at least one of the jvmArgs configured in the task

.github/agents/knowledge/javaagent-advice-patterns.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ the IDE's perspective, and per-method placement is inconsistent with the rest of
4242
## Advice Methods Must Be Static
4343

4444
All `@Advice.OnMethodEnter` and `@Advice.OnMethodExit` methods **must be `static`**. ByteBuddy
45-
inlines advice code directly into the instrumented method — there is no advice object instance.
45+
inlines advice code directly into the instrumented method by default — there is no advice object
46+
instance. Do not add or remove `inline = false` as cleanup; it is a semantic signal used by
47+
muzzle/indy tooling.
4648

4749
```java
4850
// ✅ Correct

.github/agents/knowledge/metadata-yaml-format.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ Add `examples` only for module-specific configs with non-obvious format (lists,
8787
### 1. Validate experimental markers match
8888
8989
- `/development` in declarative_name ↔ `experimental` in flat name (MUST match both ways)
90+
- Do not rename an existing, published `declarative_name` solely to make it match the mechanical
91+
conversion rule. Flat property lookup normalizes `-` to `.`, so a legacy YAML key such as
92+
`java.aws_sdk.use_propagator_for_messaging/development` can still resolve to
93+
`otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging` without a special
94+
mapping. Let the automated validation decide whether a `SPECIAL_MAPPINGS` entry is actually
95+
needed.
9096
- WRONG: `otel.instrumentation.servlet.capture-request-parameters` + `java.servlet.capture_request_parameters/development`
9197
- RIGHT: `otel.instrumentation.servlet.experimental.capture-request-parameters` + `java.servlet.capture_request_parameters/development`
9298

@@ -152,4 +158,6 @@ FAIL in ../instrumentation/liberty/liberty-20.0/metadata.yaml:
152158
## Edge Cases
153159

154160
- Properties without `otel.instrumentation.` prefix → check SPECIAL_MAPPINGS
155-
- Already has declarative_name → skip conversion
161+
- Already has declarative_name → skip conversion unless the automated validation fails; preserve
162+
existing user-facing YAML keys and add a `SPECIAL_MAPPINGS` bridge entry only when normalized flat
163+
property lookup cannot resolve the existing name

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
non-checked wait path exists (for example, when a timeout is required via
3131
`get(timeout, unit)`), leave the test's `throws` clause as-is — including `throws Exception`
3232
— rather than inventing a new helper just to narrow it.
33+
- Do **not** replace a direct `CountDownLatch.await(timeout, unit)` assertion with Awaitility
34+
polling of `getCount()` solely to avoid `InterruptedException` and narrow the test method's
35+
`throws` clause. Prefer the conventional
36+
`assertThat(latch.await(timeout, unit)).isTrue()` form for latch-based callback waits, even
37+
when that means leaving `throws Exception` on the test method.
3338
- Do **not** wrap a checked exception inside a lambda body (for example, catching
3439
`IOException` and rethrowing `UncheckedIOException`) solely to narrow a test method's
3540
`throws` clause. That noisy try/catch inside the lambda is worse than leaving
@@ -107,9 +112,12 @@
107112
valid until this method returns; for example, if the assertion expects a `used` connection point,
108113
keep the borrowed connection open until after the assertion.
109114
- After removing a metric-producing source or unregistering an observable callback, call
110-
`testing().clearData()` and then use `waitAndAssertMetrics(..., AbstractIterableAssert::isEmpty)`
111-
for absence checks. Do not add an exporter-interval sleep before or after `clearData()` solely to
112-
wait for metrics; the test runners force-flush metrics when reading them.
115+
`testing().clearData()` and then use Awaitility around the simplest assertion that captures the
116+
intent. For example, when the test expects no metrics from an instrumentation scope, prefer
117+
`await().untilAsserted(() -> assertThat(testing().metrics()).filteredOn(...).isEmpty())` over
118+
expanding the check into one `waitAndAssertMetrics(..., AbstractIterableAssert::isEmpty)` call per
119+
possible metric name. Do not add an exporter-interval sleep before or after `clearData()` solely
120+
to wait for metrics; the test runners force-flush metrics when reading them.
113121

114122
## Attribute Assertion `satisfies()` Lambda Parameters
115123

.github/agents/knowledge/testing-semconv-stability.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Quick Reference
44

55
- Use when: reviewing semconv dual-mode assertions or `testStableSemconv` / `testBothSemconv` tasks
6-
- Review focus: mode-specific assertions, `maybeStable()` usage boundaries, class-level deprecation suppression
6+
- Review focus: mode-specific assertions, `maybeStable()` usage boundaries
77

88
## Background: The Three Modes
99

@@ -109,7 +109,3 @@ if (emitOldCodeSemconv()) {
109109
assertThat(attributes).containsEntry(CODE_NAMESPACE, "MyClass");
110110
}
111111
```
112-
113-
## Key Rules
114-
115-
- Add `@SuppressWarnings("deprecation")` at class level when tests use old Semconv constants.

.github/agents/module-cleanup.agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ Auto-fix boundaries:
113113
whose directory name contains `-common`, or whose Gradle path ends with `:testing`,
114114
`:library`, or `:bootstrap`, **first search all sibling modules** under the same
115115
instrumentation parent for callers of the type or member before applying the fix.
116-
- normalization of existing `@SuppressWarnings` syntax or placement, but preserve any
117-
accurate explanatory comment attached to the suppression instead of deleting it as
118-
style noise
116+
- normalization of existing `@SuppressWarnings` syntax or placement, but only when it preserves
117+
or narrows the suppression to the minimal required scope; preserve any accurate explanatory
118+
comment attached to the suppression instead of deleting it as style noise
119119
- obvious assertion API migrations (e.g., AssertJ preference) and idiomatic
120120
simplifications listed in `testing-general-patterns.md` § AssertJ Idiomatic
121121
Simplifications (e.g., `assertThat(list.size()).isEqualTo(N)`

.github/agents/pr-review.agent.md

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

.github/config/latest-dep-versions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@
119119
"commons-httpclient:commons-httpclient#+": "3.1",
120120
"commons-httpclient:commons-httpclient#3.+": "3.1",
121121
"dev.failsafe:failsafe#+": "3.3.2",
122-
"dev.zio:zio-http_2.12#+": "3.11.0",
123-
"dev.zio:zio-http_2.13#+": "3.11.0",
124-
"dev.zio:zio-http_3#+": "3.11.0",
122+
"dev.zio:zio-http_2.12#+": "3.11.1",
123+
"dev.zio:zio-http_2.13#+": "3.11.1",
124+
"dev.zio:zio-http_3#+": "3.11.1",
125125
"dev.zio:zio_2.12#+": "2.1.25",
126126
"dev.zio:zio_2.13#+": "2.1.25",
127127
"dev.zio:zio_3#+": "2.1.25",

.github/config/lychee.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ max_retries = 6
77
max_concurrency = 4
88

99
# Check link anchors
10-
include_fragments = true
10+
include_fragments = "full"
1111

1212
remap = [
1313
"https://docs.oracle.com/(.*)#.*$ https://docs.oracle.com/$1"

0 commit comments

Comments
 (0)