For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • About NVIDIA NeMo Relay
    • Overview
    • Architecture
    • Ecosystem
    • Concepts
    • Release Notes
  • Getting Started
    • Agent Runtime Primer
    • Prerequisites
    • Installation
    • Configuration / Setup
    • Quick Start
  • NVIDIA NeMo Relay CLI
    • About
    • Basic Usage
    • Claude Code
    • Codex
    • Cursor
    • Hermes Agent
  • Supported Integrations
    • About
    • OpenClaw Plugin Guide
    • LangChain Integration Guide
    • LangGraph Integration Guide
    • Deep Agents Integration Guide
  • Instrument Applications
    • About
    • Adding Scopes and Marks
    • Instrument a Tool Call
    • Instrument an LLM Call
    • Add Middleware
    • Code Examples
  • Observability Plugin
    • About
    • Configuration
    • Agent Trajectory Interchange Format (ATIF)
    • Agent Trajectory Observability Format (ATOF)
    • OpenTelemetry
    • OpenInference
  • Adaptive Plugin
    • About
    • Configuration
    • Adaptive Cache Governor (ACG)
    • Adaptive Hints
  • NeMo Guardrails Plugin
    • About
    • Configuration
  • Integrate into Frameworks
    • About
    • Adding Scopes
    • Wrap Tool Calls
    • Wrap LLM Calls
    • Handle Non-Serializable Data
    • Using Codecs
    • Provider Codecs
    • Provider Response Codecs
    • Code Examples
  • Build Plugins
    • About
    • Define a Plugin
    • Validate Plugin Configuration
    • Plugin Configuration Files
    • Register Plugin Behavior
    • Design Plugin Configuration
    • NeMo Guardrails Example Plugin
    • Code Examples
  • Contribute
    • About
    • Development Setup
    • Workflow and Reviews
    • Testing and Documentation
  • Reference
    • APIs
    • Performance
  • Resources
    • Support and FAQs
    • Glossary
    • Troubleshooting Guide
    • Community
    • Legal
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogo
On this page
  • plugins.toml Example
  • Fields
  • Expected Output
  • Plugin Configuration
  • Manual API
  • Common Validation Failures
Observability Plugin

OpenTelemetry

||View as Markdown|
Previous

Agent Trajectory Observability Format (ATOF)

Next

OpenInference

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

1version = 1
2
3[[components]]
4kind = "observability"
5enabled = true
6
7[components.config]
8version = 1
9
10[components.config.opentelemetry]
11enabled = true
12transport = "http_binary"
13endpoint = "http://localhost:4318/v1/traces"
14service_name = "agent-service"
15service_namespace = "nemo"
16service_version = "1.0.0"
17instrumentation_scope = "nemo-relay-otel"
18timeout_millis = 3000
19
20[components.config.opentelemetry.headers]
21authorization = "Bearer <token>"
22
23[components.config.opentelemetry.resource_attributes]
24"deployment.environment" = "dev"

This configuration registers a plugin-owned OpenTelemetry subscriber and sends NeMo Relay trace spans to the configured OTLP endpoint.

Fields

FieldDefaultNotes
enabledfalseMust be true to construct and register the subscriber.
transporthttp_binaryhttp_binary or grpc.
endpointExporter defaultOTLP endpoint.
headers{}String-to-string exporter headers.
resource_attributes{}String-to-string OTLP resource attributes.
service_namenemo-relayservice.name resource attribute.
service_namespaceOmittedOptional service.namespace.
service_versionOmittedOptional service.version.
instrumentation_scopeOmittedOptional instrumentation scope name.
timeout_millis3000Export timeout.

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 root agent span’s nemo_relay.uuid also matches the ATIF session_id. Backend-native trace_id and span_id values are not written into ATIF.

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.

Python
Node.js
Rust
1from nemo_relay import plugin
2from nemo_relay.observability import ComponentSpec, ObservabilityConfig, OtlpConfig
3
4config = plugin.PluginConfig(
5 components=[
6 ComponentSpec(
7 ObservabilityConfig(
8 opentelemetry=OtlpConfig(
9 enabled=True,
10 transport="http_binary",
11 endpoint="http://localhost:4318/v1/traces",
12 service_name="agent-service",
13 service_namespace="nemo",
14 service_version="1.0.0",
15 instrumentation_scope="nemo-relay-otel",
16 resource_attributes={"deployment.environment": "dev"},
17 headers={"authorization": "Bearer <token>"},
18 )
19 )
20 )
21 ]
22)
23
24report = plugin.validate(config)
25if any(diagnostic["level"] == "error" for diagnostic in report["diagnostics"]):
26 raise RuntimeError(report["diagnostics"])
27
28await plugin.initialize(config)
29try:
30 # Run instrumented application work here.
31 pass
32finally:
33 plugin.clear()

Manual API

Use the manual subscriber API when you need an explicit subscriber name or direct force_flush control.

Python
Node.js
Rust
1from nemo_relay import OpenTelemetryConfig, OpenTelemetrySubscriber
2
3config = OpenTelemetryConfig()
4config.transport = "http_binary"
5config.endpoint = "http://localhost:4318/v1/traces"
6config.service_name = "agent-service"
7config.set_resource_attribute("deployment.environment", "dev")
8
9subscriber = OpenTelemetrySubscriber(config)
10subscriber.register("otel-exporter")
11
12# Run instrumented application work here.
13
14subscriber.force_flush()
15subscriber.deregister("otel-exporter")
16subscriber.shutdown()

Common Validation Failures

  • transport is not http_binary or grpc.
  • 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.