OpenTelemetry Integration
The NVIDIA NeMo Guardrails library follows OpenTelemetry best practices. The library uses only the API, and the host application configures the SDK. The following sections explain how to install and configure the OpenTelemetry SDK.
Installation
Choose one of the following options for installing the library with tracing support, the OpenTelemetry SDK, and the OpenTelemetry Protocol (OTLP) exporter.
-
For basic tracing support in the NeMo Guardrails library:
-
For development with the OpenTelemetry SDK:
-
For production with the OpenTelemetry SDK and the OpenTelemetry Protocol (OTLP) exporter:
Configuration Examples
The following examples show how to configure the library with the OpenTelemetry SDK for development and production use cases.
Console Output (Development)
OTLP Exporter (Production)
OpenTelemetry Ecosystem Compatibility
The library works with the entire OpenTelemetry ecosystem, including the following components.
Refer to the OpenTelemetry Registry for the complete list.
Exporting Logs
To also forward guardrails Python log records into your OpenTelemetry backend with trace correlation, see OpenTelemetry Logs.