[Feature] Support external OTLP collector for trace runtime - #2041
Open
matrix72c wants to merge 5 commits into
Open
[Feature] Support external OTLP collector for trace runtime#2041matrix72c wants to merge 5 commits into
matrix72c wants to merge 5 commits into
Conversation
matrix72c
force-pushed
the
feat/external-otel-collector
branch
from
August 24, 2026 14:09
d6f6738 to
7681fde
Compare
matrix72c
force-pushed
the
feat/external-otel-collector
branch
from
September 7, 2026 03:51
4c80db2 to
fa952bf
Compare
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.
Summary
Allow XTuner processes to export spans to an externally managed, network-reachable OTLP collector while preserving the existing driver-local collector and viewer defaults.
Motivation
The default trace path introduced in #1946 uses a collector on the driver's loopback address. In a multi-pod deployment, a remote Ray actor resolves
127.0.0.1to its own pod, so it cannot reach the driver's collector and its spans are missing from the JSONL and Jaeger traces.This PR allows the producers to use a routable collector Service instead:
Configuration
external_otlp_endpointis propagated to Ray child processes so every process exports to the same reachable collector.external_trace_jsonl_pathonly tells the driver-side viewer where to read the collector-owned JSONL file; it does not configure or start the collector and is not propagated to Ray child processes.service.nameand XTunerrun.id, so the file may contain spans from multiple runs.xtuner_viewer_enabled=False; no JSONL path is required.Compatibility
When
external_otlp_endpointis unset, local collector startup, per-runtraces.jsonloutput, viewer startup, and shutdown behavior remain unchanged. External collectors are never started or stopped by XTuner.Tests
ruff check.compileall.git diff --check.