OpenTelemetry
Use the opentelemetry section when you want NeMo Relay lifecycle events
exported as generic OpenTelemetry Protocol (OTLP) trace spans.
OpenTelemetry export is a good fit when your tracing backend already expects OTLP spans and you want NeMo Relay scopes, tool calls, LLM calls, and marks to appear in the same tracing pipeline as the rest of the application.
plugins.toml Example
Add the following OpenTelemetry exporter configuration to plugins.toml:
This configuration registers a plugin-owned OpenTelemetry subscriber and sends NeMo Relay trace spans to the configured OTLP endpoint.
Fields
The following table describes OpenTelemetry exporter settings:
Expected Output
The collector should receive OTLP trace export requests. The tracing backend should show spans for NeMo Relay scopes, tools, LLM calls, and marks grouped by root scope.
Each lifecycle span includes nemo_relay.uuid and nemo_relay.parent_uuid
attributes. These values match ATIF step.extra.ancestry.function_id and
step.extra.ancestry.parent_id for the same events. For plugin-managed ATIF,
the trajectory-root span’s nemo_relay.uuid also matches the ATIF session_id.
Backend-native trace_id and span_id values are not written into ATIF.
For LLM end spans, cost is emitted as nemo_relay.llm.cost.total and
nemo_relay.llm.cost.currency (any currency). Token counts are not emitted as
discrete attributes. Refer to
Token and Cost Field Semantics
for the full mapping.
Register the plugin before the first instrumented request, use stable service identity fields, keep credentials outside source code, and flush during graceful shutdown.
Plugin Configuration
Use plugin configuration when the application should let NeMo Relay own the OpenTelemetry subscriber lifecycle. The following examples configure and activate the OpenTelemetry exporter through each supported language binding.
validate() checks only the supplied in-memory object. initialize() also
layers discovered plugins.toml configuration. For effective file-backed
validation, refer to Plugin Configuration Files
and run the gateway with the same configuration path that production uses.
Python
Node.js
Rust
Manual API
Use the manual subscriber API when you need an explicit subscriber name or
direct force_flush control.
Python
Node.js
Rust
Common Configuration and Runtime Issues
transportis nothttp_binaryorgrpc.- Headers or resource attributes are not string-to-string maps.
- The exporter feature is unavailable in the current build or target.
- The endpoint is unreachable at runtime.