Skip to content

Commit b1c11e8

Browse files
authored
Update change log for upcoming release (#16157)
1 parent 056af8c commit b1c11e8

File tree

2 files changed

+128
-6
lines changed

2 files changed

+128
-6
lines changed

.github/scripts/draft-change-log-entries.sh

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,46 @@ echo
4141
echo "### 🧰 Tooling"
4242
echo
4343

44-
# Group commits by file type
44+
# Group commits by file type and @Deprecated detection
4545
declare -A src_main_commits
4646
declare -A no_src_main_commits
47+
declare -A deprecated_added_commits
48+
declare -A deprecated_removed_commits
49+
50+
format_commit_msg() {
51+
git log --format=%s -n 1 "$1" | sed -E 's, *\(#([0-9]+)\)$, ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),'
52+
}
4753

4854
while IFS= read -r commit_hash; do
4955
files=$(git diff-tree --no-commit-id --name-only -r "$commit_hash")
5056

5157
has_src_main=false
5258

5359
while IFS= read -r file; do
54-
if [[ $file =~ /src/main/ ]] && [[ ! $file =~ ^smoke-tests/ ]] && [[ ! $file =~ ^smoke-tests-otel-starter/ ]] && [[ ! $file =~ /testing/ ]]; then
60+
if [[ $file =~ /src/main/ ]] && [[ ! $file =~ ^smoke-tests/ ]] && [[ ! $file =~ ^smoke-tests-otel-starter/ ]] && [[ ! $file =~ /testing/ ]] && [[ ! $file =~ -testing/ ]] && [[ ! $file =~ ^instrumentation-docs/ ]]; then
5561
has_src_main=true
5662
break
5763
fi
5864
done <<< "$files"
5965

6066
commit_msg=$(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')
6167

68+
# Check diff for @Deprecated additions/removals in src/main Java files
69+
# Count added vs removed to distinguish real changes from moves/refactors
70+
diff_output=$(git diff-tree -p "$commit_hash" -- '*/src/main/**/*.java' 2>/dev/null || true)
71+
72+
added_count=$(echo "$diff_output" | grep -cP '^\+(?!\+).*@Deprecated' || true)
73+
removed_count=$(echo "$diff_output" | grep -cP '^-(?!-).*@Deprecated' || true)
74+
75+
# Net new @Deprecated annotations = new deprecation
76+
if [[ $added_count -gt $removed_count ]]; then
77+
deprecated_added_commits["$commit_hash"]=1
78+
fi
79+
# Net removed @Deprecated annotations = removed deprecated API (breaking)
80+
if [[ $removed_count -gt $added_count ]]; then
81+
deprecated_removed_commits["$commit_hash"]=1
82+
fi
83+
6284
# Categorize commit
6385
if [[ $has_src_main == true ]]; then
6486
src_main_commits["$commit_hash"]="$commit_msg"
@@ -67,13 +89,37 @@ while IFS= read -r commit_hash; do
6789
fi
6890
done < <(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range")
6991

92+
# Output @Deprecated-based breaking changes (removed @Deprecated = removed deprecated API)
93+
if [[ ${#deprecated_removed_commits[@]} -gt 0 ]]; then
94+
echo "#### Possible breaking changes (diff removes @Deprecated)"
95+
echo
96+
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
97+
if [[ -n ${deprecated_removed_commits[$commit_hash]} ]]; then
98+
echo "- $(format_commit_msg "$commit_hash")"
99+
fi
100+
done
101+
echo
102+
fi
103+
104+
# Output @Deprecated-based deprecations (added @Deprecated = new deprecation)
105+
if [[ ${#deprecated_added_commits[@]} -gt 0 ]]; then
106+
echo "#### Possible deprecations (diff adds @Deprecated)"
107+
echo
108+
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
109+
if [[ -n ${deprecated_added_commits[$commit_hash]} ]]; then
110+
echo "- $(format_commit_msg "$commit_hash")"
111+
fi
112+
done
113+
echo
114+
fi
115+
70116
# Output grouped commits
71117
if [[ ${#src_main_commits[@]} -gt 0 ]]; then
72118
echo "#### Changes with src/main updates"
73119
echo
74120
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
75-
if [[ -n ${src_main_commits[$commit_hash]} ]]; then
76-
echo "- $(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$, ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')"
121+
if [[ -n ${src_main_commits[$commit_hash]} ]] && [[ -z ${deprecated_added_commits[$commit_hash]} ]] && [[ -z ${deprecated_removed_commits[$commit_hash]} ]]; then
122+
echo "- $(format_commit_msg "$commit_hash")"
77123
fi
78124
done
79125
echo
@@ -83,8 +129,8 @@ if [[ ${#no_src_main_commits[@]} -gt 0 ]]; then
83129
echo "#### Changes without src/main updates"
84130
echo
85131
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
86-
if [[ -n ${no_src_main_commits[$commit_hash]} ]]; then
87-
echo "- $(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$, ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')"
132+
if [[ -n ${no_src_main_commits[$commit_hash]} ]] && [[ -z ${deprecated_added_commits[$commit_hash]} ]] && [[ -z ${deprecated_removed_commits[$commit_hash]} ]]; then
133+
echo "- $(format_commit_msg "$commit_hash")"
88134
fi
89135
done
90136
echo

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,82 @@
22

33
## Unreleased
44

5+
### ⚠️ Breaking changes to non-stable APIs
6+
7+
- Make Netty 4.1 library public API self-contained
8+
([#15981](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15981))
9+
- Remove previously deprecated methods
10+
([#15892](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15892),
11+
[#15929](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15929),
12+
[#15943](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15943),
13+
[#15944](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15944),
14+
[#15945](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15945))
15+
16+
### 🚫 Deprecations
17+
18+
- Deprecated `getDelegate()`, `request()`, `channel()`, `remoteAddress()` in HTTP client request
19+
wrapper classes in favor of `getRequest()`, `getChannel()`, `getRemoteAddress()` for consistency
20+
([#15942](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15942))
21+
- Deprecated `NettyClientTelemetry.setChannelContext()` in favor of `setParentContext()`
22+
([#16010](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16010))
23+
- Deprecated `new*` methods in favor of `create*` methods in Armeria and Jetty client
24+
instrumentation (e.g., `newDecorator()``createDecorator()`,
25+
`newHttpClient()``createHttpClient()`)
26+
([#16009](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16009))
27+
- Deprecated `NettyServerTelemetry.createResponseHandler()` and `createCombinedHandler()` overloads
28+
that expose internal classes
29+
([#16011](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16011))
30+
- Deprecated `RatpackServerTelemetry.getHandler()`, `getExecInterceptor()`, and
31+
`getExecInitializer()` in favor of `createHandler()`, `createExecInterceptor()`, and
32+
`createExecInitializer()`
33+
([#16013](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16013))
34+
- Deprecated `setPeerService()` in HTTP, gRPC, Dubbo, and Armeria instrumentation builders in favor
35+
of `addAttributesExtractor()`
36+
([#16059](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16059))
37+
- Deprecated `RpcAttributesGetter.getMethod()` in favor of `getRpcMethod()` to support stable RPC
38+
semantic conventions
39+
([#16121](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16121))
40+
- Deprecated `PeerServiceResolver`, `PeerServiceAttributesExtractor`, and
41+
`HttpClientPeerServiceAttributesExtractor` in favor of renamed classes `ServicePeerResolver`,
42+
`ServicePeerAttributesExtractor`, and `HttpClientServicePeerAttributesExtractor`
43+
([#16071](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16071))
44+
- Deprecated `setStatementSanitizationEnabled()` in favor of `setQuerySanitizationEnabled()` across
45+
database instrumentation builders (Cassandra, JDBC, Lettuce, Mongo, R2DBC)
46+
([#16133](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16133))
47+
- Deprecated individual runtime metric classes (`Classes`, `Cpu`, `GarbageCollector`,
48+
`MemoryPools`, `Threads`) in favor of `RuntimeMetrics`
49+
([#16064](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16064))
50+
- Deprecated `SqlStatementInfo` in favor of `SqlQuery`, and `SqlStatementSanitizer` in favor of
51+
`SqlQuerySanitizer`
52+
([#16074](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16074))
53+
54+
### 🌟 New library instrumentation
55+
56+
- Servlet 5
57+
([#16033](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16033))
58+
59+
### 📈 Enhancements
60+
61+
- Logback appender: add declarative config support
62+
([#15813](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15813))
63+
- OkHttp: avoid weak reference in library instrumentation
64+
([#15977](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15977))
65+
- HTTP clients: Enable query redaction by default in library instrumentations
66+
([#16096](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16096))
67+
- HttpURLConnection: mark as early instrumentation to ensure virtual fields are used
68+
([#16142](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16142))
69+
70+
### 🛠️ Bug fixes
71+
72+
- Dropwizard metrics: Sanitize names where needed to comply with OpenTelemetry requirements
73+
([#15954](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/15954))
74+
- Instrumentation API incubator: Fix span key mapping for MESSAGING_CONSUMER_PROCESS
75+
([#16001](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16001))
76+
- Couchbase: Fix local address occasionally missing
77+
([#16035](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16035))
78+
- Internal logging: Map jul config level to debug instead of info
79+
([#16141](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/16141))
80+
581
## Version 2.24.0 (2026-01-17)
682

783
### ⚠️ Breaking Changes

0 commit comments

Comments
 (0)