feat: Adds distributed tracing for dial-in/dial-out call setup. - #646
Open
aaronkvanmeerten wants to merge 3 commits into
Open
feat: Adds distributed tracing for dial-in/dial-out call setup.#646aaronkvanmeerten wants to merge 3 commits into
aaronkvanmeerten wants to merge 3 commits into
Conversation
Adds OpenTelemetry-based tracing via jicoco-tracing, following the same
model as jicofo (tracing.{enabled,service-name,otlp-endpoint,otlp-protocol}
in reference.conf, disabled by default).
A span covers the setup of each call, from the dial request or SIP INVITE
until media is established (or setup fails), with milestone events for MUC
join, focus invite, lobby, SIP INVITE sent and both legs establishing. The
span is carried in CallContext (setup crosses many threads, so the
thread-local OTel context cannot be used) and its ctx.id attribute matches
the [ctx=...] tag in log lines.
Trace context propagation:
- dial-out: parented from a traceparent extension on the dial IQ if
present, or from an X-Traceparent rayo header in W3C trace context
format (which survives RayoIqProvider parsing, unlike child extension
elements). The X-Traceparent header is re-emitted with our span id and
forwarded to the outgoing SIP INVITE.
- dial-in: parented from a Traceparent/X-Traceparent SIP INVITE header
when the SIP frontend (e.g. VoxImplant) provides one.
- The outgoing ConferenceIq to jicofo carries a traceparent extension so
jicofo can join the trace.
The jitsi-xmpp-extensions bump removed MuteIqProvider.registerMuteIqProvider,
replaced with an explicit ProviderManager registration.
ConferenceIqProvider only parses property children of the conference element, so a traceparent extension on the ConferenceIq is dropped at parse time on the jicofo side. Send the context also as a 'traceparent' property in W3C format, which round-trips through the existing provider. Keep the extension form for when the provider learns to parse it.
Extends the mock telephony/JitsiMeetTools to pass INVITE headers so a dial-in with a Traceparent header can be exercised end to end, and adds tests covering: - dial-in joining an upstream trace via the Traceparent SIP header - dial-out joining an upstream trace via the X-Traceparent rayo header, and re-emitting the context towards the SIP leg - dial IQ rejection paths (missing JvbRoomName, disabled gateways) - TracingUtil traceparent extension extraction/attachment and malformed trace-flags fallback Raises patch coverage for the tracing change from ~49% to ~94%; the remaining uncovered lines are environment-gated (lobby join event, real-XMPP-provider branch in inviteFocus, start-muted provider registration, transcriber established event).
damencho
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds OpenTelemetry-based distributed tracing via jicoco-tracing, following the model established in jicofo (jitsi/jicofo#1294):
tracing.{enabled,service-name,otlp-endpoint,otlp-protocol}inreference.conf, disabled by default (no-op tracer when off).A span covers the setup of each call — from the dial request (dial-out/transcription) or SIP INVITE (dial-in) until media is established or setup fails — with milestone events for MUC join, focus invite, lobby join, SIP INVITE sent, and each leg establishing. The span is carried in
CallContextsince call setup crosses many threads, and itsctx.idattribute matches the[ctx=...]tag in log lines so traces correlate with logs.Trace context propagation
traceparentextension on the incoming dial IQ when present, or from anX-Traceparentrayo header holding a W3C trace context value. The header form is what actually round-trips today:RayoIqProvideronly parsesheaderchildren, so atraceparentchild element is dropped at parse time. The header is re-emitted with jigasi's span id and forwarded on the outgoing SIP INVITE (X-headers pass through intermediaries such as VoxImplant).Traceparent/X-TraceparentSIP INVITE header when the SIP frontend provides one (all INVITE headers reachonJoinJitsiMeetRequest).ConferenceIqto jicofo carries atraceparentextension so jicofo can join the trace (jicofo-side change to parent from it is separate).Notes
TraceParent). The latter removedMuteIqProvider.registerMuteIqProvider(); replaced with an explicitProviderManagerregistration.mod_trace.luagains arayo.dialhop span (PR in jitsi-meet).Testing
mvn verifypasses (checkstyle + all tests). NewTracingUtilTestcovers W3C traceparent parsing/formatting round-trip and malformed input.