nemo_rl.telemetry.config#
Telemetry configuration schema for NeMo-RL.
The telemetry: block of a run config. :mod:nemo_rl.telemetry.setup
translates it into NEMO_RL_OTEL_* environment variables on the driver
before init_ray(), so every Ray worker inherits the same settings via the
Ray runtime_env. Raw NEMO_RL_OTEL_* / OTEL_EXPORTER_OTLP_* env vars
always win over these YAML values (they are applied with setdefault).
This module imports only pydantic — it never requires nemo-lens, so it is
safe to import unconditionally from the algorithm MasterConfig classes.
Module Contents#
Classes#
OpenTelemetry / nemo-lens configuration. |
API#
- class nemo_rl.telemetry.config.TelemetryConfig#
Bases:
pydantic.BaseModelOpenTelemetry / nemo-lens configuration.
Telemetry activates only when
enabledis true; otherwise every instrumentation site degrades to a ~0-cost no-op.Fields with a fixed set of valid values are typed so that a typo is rejected when the YAML is parsed, in every process, rather than surfacing later on a GPU node – or not at all, when
enabledis false and the driver returns before it validates anything.- enabled: bool#
False
Master switch. When false, all instrumentation is a ~0-cost no-op.
- service_name: str#
‘nemo-rl’
service.namereported to the OTLP backend.
- span_groups: str#
‘default’
Span-group spec: a preset (
default|per_step|all) or a comma-separated list of individual group names (e.g."default,generation,reward"). SeeRLSpanGroup.
- traces_enabled: bool#
True
Emit trace spans.
- metrics_enabled: bool#
True
Emit metric instruments (the
rl.*gauges/histograms).
- logs_enabled: bool#
False
Bridge Python logging to OTel logs (exported with trace correlation).
- exporter: Literal[otlp, console]#
‘otlp’
Exporter backend. The OTLP endpoint / headers / protocol come from the standard
OTEL_EXPORTER_OTLP_*env vars, so any OTLP-compatible backend or an OpenTelemetry Collector works.
- vllm_native_tracing: bool#
False
Enable vLLM’s own OTLP tracing inside generation workers (opt-in). vLLM builds its exporter itself and defaults it to gRPC, reading only
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL– not the genericOTEL_EXPORTER_OTLP_PROTOCOLlens honours. To ride the samehttp/protobufendpoint as lens, set the traces-specific var too.vLLM traces per request, so this emits one span per rollout – thousands per step, against ~20 for the rest of the run – and vLLM offers no sampling knob. Switch it on to debug a few steps, not for a training run. For engine behaviour in aggregate the
vllm/*metrics are on by default and cost two RPCs per step (a snapshot before generation and a read after).