> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/relay/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Module openinference

> OpenInference subscriber support for NeMo Relay.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi`.

OpenInference subscriber support for NeMo Relay.

This crate adapts NeMo Relay lifecycle events into OpenInference trace spans:

* scope/tool/LLM `Start` events open spans
* matching `End` events close spans
* `Mark` events become span events on the active parent span when possible
* orphan marks fall back to zero-duration spans so they still reach OTLP

The public API is intentionally small:

* [`OpenInferenceConfig`](/reference/api/rust-library-reference/nemo-relay/observability/openinference/struct-openinferenceconfig) configures the OTLP exporter and OpenInference metadata
* [`OpenInferenceSubscriber`](/reference/api/rust-library-reference/nemo-relay/observability/openinference/struct-openinferencesubscriber) exposes a NeMo Relay [`EventSubscriberFn`](/reference/api/rust-library-reference/nemo-relay/api/runtime/callbacks/type-eventsubscriberfn) and convenience `register` / `deregister` / `force_flush` / `shutdown` methods

## Structs

* [OpenInferenceConfig](/reference/api/rust-library-reference/nemo-relay/observability/openinference/struct-openinferenceconfig): Configuration for the OpenInference subscriber.
* [OpenInferenceSubscriber](/reference/api/rust-library-reference/nemo-relay/observability/openinference/struct-openinferencesubscriber): OpenInference-backed NeMo Relay subscriber.

## Enums

* [OpenInferenceError](/reference/api/rust-library-reference/nemo-relay/observability/openinference/enum-openinferenceerror): Errors produced while configuring or operating the OpenInference subscriber.
* [OtlpTransport](/reference/api/rust-library-reference/nemo-relay/observability/openinference/enum-otlptransport): Supported OTLP trace transports.

## Type Aliases

* [Result](/reference/api/rust-library-reference/nemo-relay/observability/openinference/type-result): Result type for the OpenInference subscriber crate.