Package com.babelqueue.otel
package com.babelqueue.otel
Optional OpenTelemetry tracing for babelqueue (ADR-0025 v0.1 + ADR-0028 v0.2) — the Java mirror
of the Go
babelqueue-go/otel, Python babelqueue.otel and Node
@babelqueue/core/otel modules.
Tracing emits a CONSUMER span per handled message and a
PRODUCER span per publish, propagating the trace across every hop and SDK at two layered
levels:
trace_id↔ OTel trace id (v0.1): the envelope'strace_id— a UUID — maps 1:1 to a 32-hex OpenTelemetry trace id, so every hop that shares atrace_idshares one OTel trace (correlation + per-hop timing) with zero wire/transport change.- W3C
traceparenttransport header (v0.2): the producer also injects the active span context as atraceparentonto an out-of-band header map that rides beside the frozen envelope (HeaderSender); the consumer reads it and starts its span as a true child of the producer span (a delivered-headersSupplieronwrapHandler). With notraceparentpresent it falls back to the v0.1trace_idparent — a strict, backward-compatible upgrade.
The wire envelope is untouched (GR-1, schema_version stays 1), and
io.opentelemetry:opentelemetry-api (which itself ships OTel's W3C propagator) is declared
as an optional dependency, so the core stays zero-dependency for users who do not opt in
(GR-7).
This module delivers the v0.2 mechanism. The Java transports live in separate artifacts
(babelqueue-java-sqs, babelqueue-java-redis, babelqueue-spring), so
carrying the out-of-band header map on each broker's native per-message metadata channel is a
documented per-transport follow-up.
-
ClassDescriptionThe produce-side out-of-band header seam for
Tracing.publish(io.opentelemetry.api.trace.Tracer, String, java.util.Map, String, HeaderSender)— aSenderthat also receives aMap<String, String>of out-of-band transport headers to carry beside the frozen envelope (GR-1), never inside it.Performs the actual transport write forTracing.publish(io.opentelemetry.api.trace.Tracer, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, com.babelqueue.otel.Sender).Optional OpenTelemetry tracing for a babelqueue producer or consumer — the Java mirror of the Gobabelqueue-go/otel, Pythonbabelqueue.oteland Node@babelqueue/core/otelhelpers.