Skip to content

feat(cli): add explicit span emitter - #51

Merged
ahmadki merged 2 commits into
mainfrom
rhewett/pr3-emit-spans-cli
Sep 4, 2026
Merged

feat(cli): add explicit span emitter#51
ahmadki merged 2 commits into
mainfrom
rhewett/pr3-emit-spans-cli

Conversation

@rhewett-nv

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds the nemo-lens emit-spans CLI for exporting completed spans from explicit
epoch-second intervals in shell launch workflows.

Issues

N/A

Usage

nemo-lens emit-spans \
  --service nv.dl.launch \
  --span nv.dl.launch,1700000000.0,1700000003.0 \
  --span nv.dl.launch.container_load,1700000000.5,1700000001.5,nv.dl.launch

Before your PR is "Ready for review"

Pre checks:

  • I read the Contributor guidelines.
  • All commits are signed off (git commit -s) per the DCO.
  • I added or updated tests under tests/ for any behavior change.
  • I ran pytest and pre-commit run --all-files locally; both pass.
  • I updated docs/ and README.md where behavior, configuration, or public API changed.
  • If this changes a lens public API symbol, I updated the cross-repo _fallbacks.py files in Megatron-LM / RL / Gym.

Additional information

Validation on pr3-emit-spans-cli:

  • ../.venv/bin/pre-commit run --all-files: passed
  • PYTHONPATH=src ../.venv/bin/python -m pytest -q: 261 passed, 7 warnings
  • ../.venv/bin/python -m compileall -q src tests: passed
  • npm --prefix docs/fern run check: passed with 0 errors; one warning because the unauthenticated redirects check is skipped without fern login / FERN_TOKEN

Notes:

  • PR3 is one signed commit: 0931973 feat(cli): add explicit span emitter.
  • Invalid span input is validated before provider setup; if any span is invalid, nothing is emitted.
  • --service sets service.name and takes precedence over service.name in OTEL_RESOURCE_ATTRIBUTES.
  • New SDK-specific setup is confined to providers.py; nemo.lens.cli imports successfully with opentelemetry.sdk unavailable.
  • No cross-repo fallback update is required because this adds a CLI entry point, not a new top-level Lens Python API symbol.

@rhewett-nv
rhewett-nv requested review from a team and ahmadki as code owners August 30, 2026 23:55
@copy-pr-bot

copy-pr-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread src/nemo/lens/cli.py Outdated
Comment thread src/nemo/lens/providers.py Outdated
@rhewett-nv
rhewett-nv force-pushed the rhewett/pr3-emit-spans-cli branch 2 times, most recently from e2e4ce5 to 7c0ef13 Compare September 3, 2026 18:47
@rhewett-nv
rhewett-nv force-pushed the rhewett/pr3-emit-spans-cli branch from 7c0ef13 to e0105b2 Compare September 3, 2026 19:05
@rhewett-nv
rhewett-nv force-pushed the rhewett/pr3-emit-spans-cli branch from e0105b2 to 0a0db6d Compare September 3, 2026 19:28
@rhewett-nv
rhewett-nv force-pushed the rhewett/pr3-emit-spans-cli branch from 0a0db6d to 585420c Compare September 3, 2026 20:05
@rhewett-nv
rhewett-nv force-pushed the rhewett/pr3-emit-spans-cli branch 2 times, most recently from 96f50a4 to 866e71f Compare September 4, 2026 03:58
@ahmadki

ahmadki commented Sep 4, 2026

Copy link
Copy Markdown
Member

/ok to test 866e71f

ahmadki
ahmadki previously approved these changes Sep 4, 2026
Signed-off-by: Russell Hewett <rhewett@nvidia.com>
Signed-off-by: Russell Hewett <rhewett@nvidia.com>
@ahmadki
ahmadki force-pushed the rhewett/pr3-emit-spans-cli branch from 866e71f to 6f43410 Compare September 4, 2026 14:17
Base automatically changed from rhewett/pr2-span-utilities to main September 4, 2026 14:31
@rhewett-nv
rhewett-nv dismissed ahmadki’s stale review September 4, 2026 14:31

The merge-base changed after approval.

@ahmadki
ahmadki merged commit 80dc1ff into main Sep 4, 2026
11 of 12 checks passed
@ahmadki
ahmadki deleted the rhewett/pr3-emit-spans-cli branch September 4, 2026 14:32
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.

2 participants