Conversation
deepujain
force-pushed
the
refactor/6631-extract-otel-spans
branch
2 times, most recently
from
September 3, 2026 02:17
876532a to
561dc17
Compare
deepujain
force-pushed
the
refactor/6631-extract-otel-spans
branch
from
September 24, 2026 21:50
561dc17 to
6fbfa2e
Compare
Signed-off-by: dejain <deepujain@gmail.com> Signed-off-by: Deepak Jain <deepujain@gmail.com>
deepujain
force-pushed
the
refactor/6631-extract-otel-spans
branch
from
September 29, 2026 23:26
6fbfa2e to
29a7ea9
Compare
deepujain
marked this pull request as ready for review
September 29, 2026 23:55
This branch has not been deployed
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 does this PR do?
Large training modules are harder to review and maintain when telemetry lifecycle code is mixed into the training loop. This change moves OpenTelemetry span state and lifecycle helpers from
megatron/training/training.pyintomegatron/training/telemetry_spans.py, while leaving the training call sites unchanged.The extracted module owns startup and checkpoint-interval spans, shutdown state, and one-time
atexitand SIGTERM hook installation. Startup timestamps are passed explicitly to avoid a circular dependency ontraining.py.CPU-only tests cover startup closure, interval rerooting, one-time hook installation, hard SIGTERM teardown, and graceful SIGTERM flushing.
Issue tracking
Fixes #6631
Contribution process
Pre-checks
Validation
python3 -m py_compilepassed for all changed Python files on the repaired head.git diff --checkpassed.The repaired commit is rebased on current
mainand signed. Full package test collection on the local macOS host is blocked by the repository's unavailable Triton/GPU dependencies, so hosted GPU validation remains a maintainer-run gate.