Skip to content

HBASE-30569 Bump OpenTelemetry to 1.68.0 and opentelemetry-javaagent … - #8931

Open
xavifeds8 wants to merge 1 commit into
apache:masterfrom
xavifeds8:HBASE-30569
Open

xavifeds8 wants to merge 1 commit into
apache:masterfrom
xavifeds8:HBASE-30569

Conversation

@xavifeds8

Copy link
Copy Markdown
Contributor

…to 2.34.0

Bump opentelemetry-bom from 1.49.0 to 1.68.0 to pick up the fixes for CVE-2026-45292 (GHSA-rcgg-9c38-7xpx, unbounded W3C baggage parsing, fixed in 1.62.0) and CVE-2026-118259 (GHSA-ccrj-gw8r-854m, quadratic CPU in W3C tracestate parsing, fixed in 1.67.0). The RPC server extracts the trace context from client supplied RPC headers, so both parsers run on untrusted input.

Bump opentelemetry-javaagent from 2.30.0 to 2.34.0 as well. When the agent is attached, the application API is bridged to the agent's own bundled API, so the header parsing runs in the agent; 2.30.0 bundles API 1.64.0, 2.34.0 bundles 1.68.0.

Since 1.52.0 opentelemetry-context depends on the new opentelemetry-common artifact (Context.current() loads io.opentelemetry.common.ComponentLoader). Add it to the jars shipped by TableMapReduceUtil.addHBaseDependencyJars, otherwise MapReduce tasks that rely on the shipped jars fail with NoClassDefFoundError, the same kind of problem as HBASE-27353. The assemblies already pick it up through the io.opentelemetry:* wildcards.

opentelemetry-semconv stays at 1.29.0-alpha: it does not depend on the API version, and moving past it removes SemanticAttributes and renames the emitted span attributes, which needs its own issue.

…to 2.34.0

Bump opentelemetry-bom from 1.49.0 to 1.68.0 to pick up the fixes for
CVE-2026-45292 (GHSA-rcgg-9c38-7xpx, unbounded W3C baggage parsing,
fixed in 1.62.0) and CVE-2026-118259 (GHSA-ccrj-gw8r-854m, quadratic
CPU in W3C tracestate parsing, fixed in 1.67.0). The RPC server
extracts the trace context from client supplied RPC headers, so both
parsers run on untrusted input.

Bump opentelemetry-javaagent from 2.30.0 to 2.34.0 as well. When the
agent is attached, the application API is bridged to the agent's own
bundled API, so the header parsing runs in the agent; 2.30.0 bundles
API 1.64.0, 2.34.0 bundles 1.68.0.

Since 1.52.0 opentelemetry-context depends on the new
opentelemetry-common artifact (Context.current() loads
io.opentelemetry.common.ComponentLoader). Add it to the jars shipped
by TableMapReduceUtil.addHBaseDependencyJars, otherwise MapReduce
tasks that rely on the shipped jars fail with NoClassDefFoundError,
the same kind of problem as HBASE-27353. The assemblies already pick
it up through the io.opentelemetry:* wildcards.

opentelemetry-semconv stays at 1.29.0-alpha: it does not depend on the
API version, and moving past it removes SemanticAttributes and renames
the emitted span attributes, which needs its own issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xavifeds8

xavifeds8 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Testing

  1. OpenTelemetry 1.68.0 / javaagent 2.34.0
    Build: built master with this PR on JDK 17 (mvn clean install -DskipTests -Prelease, then
    assembly:single for the tarball). Both Shaded Packaging Invariants modules pass, so the new
    opentelemetry-common jar is not bundled into the shaded jars. The bin tarball has
    lib/client-facing-thirdparty/opentelemetry-{api,context,common}-1.68.0.jar and
    lib/trace/opentelemetry-javaagent-2.34.0.jar; this tarball was used for all runs below.

Tracing: repeated the HBASE-29293 manual check on JDK 17 and 21. Span names are identical
between 1.49.0/2.30.0 and 1.68.0/2.34.0, with no errors. The small difference in span totals
(395 vs 391 on JDK 17) is all getProcedureResult, the shell's procedure-completion polling,
which varies with timing.

Attachments:
telemetry-hbase-4.0.0-alpha-1-SNAPSHOT-jdk17-otel-1.49.0-agent-2.30.0.txt: traced shell session with the current versions.
telemetry-hbase-4.0.0-alpha-1-SNAPSHOT-jdk17-otel-1.68.0-agent-2.34.0.txt: same session with this PR.
telemetry-check-master.txt: per run on JDK 17 and 21, the OTel jars and agent version used, span counts and the comparison result.

  1. opentelemetry-common in addHBaseDependencyJars
    Since 1.52.0 opentelemetry-context needs opentelemetry-common, which addHBaseDependencyJars
    did not ship. RowCounter with only the shipped jars
    (HADOOP_CLASSPATH=$(hbase --internal-classpath mapredcp)):

without the ComponentLoader line: NoClassDefFoundError: io/opentelemetry/common/ComponentLoader
with this PR: ROWS=1000, job succeeds
Attachments:

rowcounter-without-opentelemetry-common.txt: RowCounter output with the ComponentLoader line removed (fails).
rowcounter-with-opentelemetry-common.txt: same job with this PR (succeeds).

@xavifeds8

Copy link
Copy Markdown
Contributor Author

@apurtell / @Apache9 would you like to review this pr ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant