Skip to navigation

nemo_gym.telemetry

View as MarkdownOpen in Claude

NeMo Gym telemetry: optional OpenTelemetry instrumentation via nemo-lens.

Importing this package never requires nemo-lens. Install it with uv sync --extra telemetry and switch it on with a telemetry: block or NEMO_LENS_ENABLED=1; with either missing, every instrumentation site in nemo_gym is a ~0-cost no-op.

Public surface

  • TelemetryConfig — the telemetry: config block.
  • GymSpanGroup — Gym span groups and presets.
  • configure_telemetry_env — supervisor side; hands the settings to spawned server processes through the environment.
  • init_telemetry / get_telemetry / shutdown_telemetry — per-process lifecycle.

Instrumentation primitives (managed_span / span_cm / trace_fn / is_span_group_enabled / safe_set_span_attributes) come from nemo_gym.telemetry._fallbacks, which resolves to the real nemo-lens implementations when it is installed and to no-op stubs when it is not.

See nemo_gym/telemetry/README.md for the design, and fern/versions/latest/pages/observability/ for user documentation.

Submodules

Package Contents

Data

_PUBLIC_API

API

nemo_gym.telemetry._PUBLIC_API = {'MeteredSemaphore': 'concurrency', 'Profiler': 'profiling', 'ResourcesOperation...