Skip to content

Commit 671a308

Browse files
committed
Merge origin/main into fea/genai-otel-1.37.0
Resolve conflicts: - SemconvStability.java: Integrate GenAI semconv into declarative config architecture - aws-sdk-2.2 build.gradle.kts: Keep GenAI opt-in JVM arg for bedrock tests - openai-java-1.1 build.gradle.kts: Adopt otelProps pattern, keep GenAI config - OpenAITelemetryBuilder.java: Keep ChatAttributesGetter.INSTANCE and captureMessageContent - AbstractChatTest.java: Keep extracted variable pattern for span assertions
2 parents 759c1f2 + c80068c commit 671a308

3,779 files changed

Lines changed: 49429 additions & 38447 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 & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ targets:
178178
- type: gradle
179179
path: ./
180180
target: ':instrumentation:java-util-logging:javaagent'
181-
- type: gradle
182-
path: ./
183-
target: ':instrumentation:jaxrs-client:jaxrs-client-1.1-testing'
184181
- type: gradle
185182
path: ./
186183
target: ':instrumentation:jdbc:bootstrap'
@@ -349,9 +346,6 @@ targets:
349346
- type: gradle
350347
path: ./
351348
target: ':instrumentation:armeria:armeria-grpc-1.14:javaagent'
352-
- type: gradle
353-
path: ./
354-
target: ':instrumentation:async-http-client:async-http-client-1-common:javaagent'
355349
- type: gradle
356350
path: ./
357351
target: ':instrumentation:async-http-client:async-http-client-1.8:javaagent'
@@ -361,6 +355,9 @@ targets:
361355
- type: gradle
362356
path: ./
363357
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'
364361
- type: gradle
365362
path: ./
366363
target: ':instrumentation:aws-lambda:aws-lambda-core-1.0:javaagent'
@@ -430,9 +427,6 @@ targets:
430427
- type: gradle
431428
path: ./
432429
target: ':instrumentation:clickhouse:clickhouse-client-v2-0.8:javaagent'
433-
- type: gradle
434-
path: ./
435-
target: ':instrumentation:couchbase:couchbase-2-common:javaagent'
436430
- type: gradle
437431
path: ./
438432
target: ':instrumentation:couchbase:couchbase-2.0:javaagent'
@@ -451,6 +445,9 @@ targets:
451445
- type: gradle
452446
path: ./
453447
target: ':instrumentation:couchbase:couchbase-3.4:javaagent'
448+
- type: gradle
449+
path: ./
450+
target: ':instrumentation:couchbase:couchbase-common-2.0:javaagent'
454451
- type: gradle
455452
path: ./
456453
target: ':instrumentation:dropwizard:dropwizard-metrics-4.0:javaagent'
@@ -633,10 +630,10 @@ targets:
633630
target: ':instrumentation:jms:jms-common:javaagent'
634631
- type: gradle
635632
path: ./
636-
target: ':instrumentation:jsf:jsf-jakarta-common:javaagent'
633+
target: ':instrumentation:jsf:jsf-common-javax:javaagent'
637634
- type: gradle
638635
path: ./
639-
target: ':instrumentation:jsf:jsf-javax-common:javaagent'
636+
target: ':instrumentation:jsf:jsf-jakarta-common:javaagent'
640637
- type: gradle
641638
path: ./
642639
target: ':instrumentation:jsf:jsf-mojarra-1.2:javaagent'
@@ -838,9 +835,6 @@ targets:
838835
- type: gradle
839836
path: ./
840837
target: ':instrumentation:opentelemetry-api:opentelemetry-api-1.50:javaagent'
841-
- type: gradle
842-
path: ./
843-
target: ':instrumentation:opentelemetry-api:opentelemetry-api-1.52:javaagent'
844838
- type: gradle
845839
path: ./
846840
target: ':instrumentation:opentelemetry-api:opentelemetry-api-1.56:javaagent'
@@ -913,15 +907,9 @@ targets:
913907
- type: gradle
914908
path: ./
915909
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java17:javaagent'
916-
- type: gradle
917-
path: ./
918-
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java17:library'
919910
- type: gradle
920911
path: ./
921912
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java8:javaagent'
922-
- type: gradle
923-
path: ./
924-
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java8:library'
925913
- type: gradle
926914
path: ./
927915
target: ':instrumentation:rxjava:rxjava-1.0:library'
@@ -1098,7 +1086,7 @@ targets:
10981086
target: ':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.1:javaagent'
10991087
- type: gradle
11001088
path: ./
1101-
target: ':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-common:javaagent'
1089+
target: ':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-common-3.0:javaagent'
11021090
- type: gradle
11031091
path: ./
11041092
target: ':instrumentation:jaxrs:jaxrs-3.0:jaxrs-3.0-annotations:javaagent'
@@ -1174,9 +1162,6 @@ targets:
11741162
- type: gradle
11751163
path: ./
11761164
target: ':instrumentation:spring:spring-jms:spring-jms-6.0:javaagent'
1177-
- type: gradle
1178-
path: ./
1179-
target: ':instrumentation:spring:spring-web:spring-web-3.1:javaagent'
11801165
- type: gradle
11811166
path: ./
11821167
target: ':instrumentation:spring:spring-web:spring-web-3.1:library'

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

Lines changed: 350 additions & 69 deletions
Large diffs are not rendered by default.

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,16 @@ For each file in scope:
9191
- PR mode: changed lines only
9292
- File/directory mode: all lines
9393
4. Apply checklist rules (below) and insert comments above offending lines.
94-
5. Prevent duplicates:
94+
5. Do not flag a non-capturing lambda or method reference as an allocation issue.
95+
On HotSpot / OpenJDK 8+, these are cached at the call site.
96+
6. Flag a missing version-boundary comment on a single-class `hasClassesNamed(...)`
97+
check in `classLoaderMatcher()` only after validating the stated boundary from
98+
repository or upstream evidence. Use `// added in X.Y` for a pure lower bound.
99+
If the same positive class also provides the upper bound because it disappears in a
100+
newer sibling version, preserve or request `removed in Y.Z` too. For negated checks
101+
such as `not(hasClassesNamed(...))`, use `// added in Y.Z` because the class's first
102+
appearance is what starts the excluded version range.
103+
7. Prevent duplicates:
95104
- If equivalent `REVIEW:` already exists above the same line, do not add another.
96105

97106
Comment formatting rules:
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
description: "Draft changelog entries for an upcoming release by running the draft-change-log-entries.sh script, then curating and inserting the results into CHANGELOG.md."
3+
tools: [read, edit, execute, search]
4+
---
5+
6+
You are a release-notes drafting agent for the `opentelemetry-java-instrumentation` repository.
7+
8+
Primary responsibilities:
9+
10+
- Generate draft changelog entries by running the existing shell script.
11+
- Curate, categorize, and deduplicate entries.
12+
- Update `CHANGELOG.md` with the final entries under the `## Unreleased` section.
13+
14+
Do not stop until the changelog is updated and a summary is shown.
15+
16+
## Workflow
17+
18+
### Phase 1: Gather Raw Entries
19+
20+
1. Determine the current version:
21+
22+
```bash
23+
.github/scripts/get-version.sh
24+
```
25+
26+
2. Run the draft script to generate raw entries:
27+
28+
```bash
29+
bash .github/scripts/draft-change-log-entries.sh
30+
```
31+
32+
This script:
33+
- Computes the git range since the last release tag.
34+
- Queries GitHub for PRs with `breaking change` and `deprecation` labels.
35+
- Scans commits for `@Deprecated` additions/removals.
36+
- Groups commits by whether they touch `src/main/` files.
37+
- Outputs a markdown skeleton with categorized sections.
38+
39+
3. Capture the full output. If the script fails (e.g., `gh` CLI not authenticated),
40+
report the error and stop.
41+
42+
### Phase 2: Read Prior Changelog Format
43+
44+
1. Read the top of `CHANGELOG.md` to understand the current `## Unreleased` section
45+
and the format of the most recent versioned release.
46+
2. Note the section ordering used in prior releases. The standard order is:
47+
48+
- `### ⚠️ Breaking changes to non-stable APIs` (from labeled PRs and @Deprecated removals)
49+
- `### 🚫 Deprecations` (from labeled PRs and @Deprecated additions)
50+
- `### 🌟 New javaagent instrumentation`
51+
- `### 🌟 New library instrumentation`
52+
- `### 📈 Enhancements`
53+
- `### 🛠️ Bug fixes`
54+
- `### 🧰 Tooling`
55+
56+
### Phase 3: Curate Entries
57+
58+
Using the raw output from Phase 1, build the changelog body:
59+
60+
1. **Breaking changes**: Take entries from the "Breaking Changes" labeled-PR section
61+
and from the "Possible breaking changes (diff removes @Deprecated)" section.
62+
Deduplicate by PR number.
63+
64+
2. **Deprecations**: Take entries from the "Deprecations" labeled-PR section
65+
and from the "Possible deprecations (diff adds @Deprecated)" section.
66+
Deduplicate by PR number.
67+
68+
3. **Categorize remaining commits**: For each commit in "Changes with src/main updates"
69+
that was not already placed in breaking changes or deprecations, classify it into
70+
one of these sections based on its commit message and changed files:
71+
- **New javaagent instrumentation**: commits that add a new instrumentation module
72+
(new directories under `instrumentation/`).
73+
- **New library instrumentation**: commits that add new library instrumentation modules.
74+
- **Enhancements**: feature additions, improvements, refactors to existing instrumentation.
75+
- **Bug fixes**: commits whose message contains "fix", "bug", "regression", "correct",
76+
or similar keywords.
77+
- **Tooling**: changes to build scripts, CI, testing infrastructure, or tooling.
78+
79+
4. **Omit non-user-facing changes**: Commits in "Changes without src/main updates"
80+
are typically CI, docs, or dependency updates. Exclude them from the changelog
81+
unless they are clearly user-facing (e.g., documentation that ships with the release).
82+
83+
5. Format each entry as:
84+
85+
```
86+
- Short description of the change
87+
([#NNNN](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/NNNN))
88+
```
89+
90+
When multiple PRs relate to the same logical change, group them:
91+
92+
```
93+
- Short description of the change
94+
([#AAAA](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/AAAA),
95+
[#BBBB](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/BBBB))
96+
```
97+
98+
6. Omit empty sections entirely.
99+
100+
### Phase 4: Update CHANGELOG.md
101+
102+
1. Read `CHANGELOG.md`.
103+
2. Locate the `## Unreleased` section (everything between `## Unreleased` and the
104+
next `## Version` heading).
105+
3. Replace the content of the `## Unreleased` section with the curated entries,
106+
preserving a blank line after `## Unreleased` and before the next `## Version`.
107+
4. Write the updated file.
108+
5. Show a confirmation message:
109+
110+
> ✅ Updated CHANGELOG.md with draft entries for version `<version>`.
111+
> Run `git diff CHANGELOG.md` to review the changes.
112+
113+
## Rules
114+
115+
- Never remove or modify existing versioned release sections in `CHANGELOG.md`.
116+
- Only modify the `## Unreleased` section.
117+
- Preserve the exact heading format (`## Unreleased`) — do not add a date or version number.
118+
The version heading is set later during the release process.
119+
- Use the same markdown formatting conventions as prior releases in the file.
120+
- If `gh` CLI is unavailable or not authenticated, fall back to git-only analysis
121+
(skip labeled-PR extraction) and warn the user that breaking-change and deprecation
122+
labels could not be checked.

.github/agents/knowledge/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ Load only files relevant to the current scope to reduce noise and avoid over-con
1111
| `api-deprecation-policy.md` | Public API removal, rename, or deprecation; stable vs alpha breaking changes |
1212
| `config-property-stability.md` | `otel.instrumentation.*` property add, remove, rename, or deprecation |
1313
| `general-rules.md` | Always — review checklist table and core rules enforced on every review |
14+
| `metadata-yaml-format.md` | Always — mandatory review of metadata.yaml for config coverage |
1415
| `gradle-conventions.md` | `build.gradle.kts` or `settings.gradle.kts` changes, custom test task registration or wiring |
1516
| `javaagent-advice-patterns.md` | ByteBuddy `@Advice` class or advice-method changes |
16-
| `javaagent-module-patterns.md` | `InstrumentationModule`, `TypeInstrumentation`, `Singletons`, `VirtualField`, `CallDepth` |
17+
| `javaagent-module-patterns.md` | `InstrumentationModule`, `TypeInstrumentation`, `VirtualField`, `CallDepth` |
18+
| `javaagent-singletons-patterns.md` | `*Singletons` holder classes, singleton accessors, callers of singleton accessors/fields |
1719
| `library-patterns.md` | Library instrumentation telemetry, builder, getter, or setter pattern changes |
1820
| `module-naming.md` | New or renamed modules or packages; settings includes |
21+
| `testing-general-patterns.md` | Test files in scope — assertion style, test method signatures and throws clauses, resource cleanup patterns, attribute assertion patterns, `satisfies()` lambda usage |
1922
| `testing-experimental-flags.md` | `testExperimental` task or experimental span-attribute assertions |
2023
| `testing-semconv-stability.md` | Semconv opt-in modes, `emitOld*`/`emitStable*`, `maybeStable`, Semconv test tasks |
2124

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Defined in [VERSIONING.md](../../../VERSIONING.md):
5252
Examples (flat ↔ YAML):
5353

5454
- `otel.instrumentation.http.client.capture-request-headers``request_captured_headers`**stable**
55-
- `otel.instrumentation.common.experimental.db-sqlcommenter.enabled``sqlcommenter/development: { enabled: true }`**experimental**
55+
- `otel.instrumentation.common.db.experimental.sqlcommenter.enabled``sqlcommenter/development: { enabled: true }`**experimental**
5656
- `otel.instrumentation.http.client.emit-experimental-telemetry``emit_experimental_telemetry/development: true`**experimental**
5757

5858
## Deprecation Communication

0 commit comments

Comments
 (0)