> 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 AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Struct Open Telemetry Config

> Configuration for the OpenTelemetry subscriber.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

```rust
pub struct OpenTelemetryConfig { /* private fields */ }
```

Configuration for the OpenTelemetry subscriber.

## Implementations

### `impl OpenTelemetryConfig`

<pre />

#### `new`

<pre />

Creates a typed OpenTelemetry exporter for a required OTLP endpoint.

#### `with_endpoint`

<pre />

Overrides the OTLP endpoint. If unset, exporter defaults and OTEL\_\* env vars apply.

#### `with_transport`

<pre />

Selects the OTLP transport.

#### `with_service_name`

<pre />

Sets the `service.name` resource attribute.

#### `with_header`

<pre />

Adds a header/metadata entry for the exporter.

#### `with_header_env`

<pre />

Maps an exporter header name to the environment variable supplying its value.

#### `with_resource_attribute`

<pre />

Adds a resource attribute as a string key/value pair.

#### `with_timeout`

<pre />

Sets the OTLP request timeout.

#### `with_completed_span_context_ttl`

<pre />

Sets how long completed scopes retain their trace context for late marks.

The value must be greater than zero. Subscriber construction fails with [`OpenTelemetryError::ExporterBuild`](/reference/api/rust-library-reference/nemo-relay/observability/otel/enum-opentelemetryerror) when the TTL is zero.

#### `with_service_namespace`

<pre />

Sets the service namespace resource attribute.

#### `with_service_version`

<pre />

Sets the service version resource attribute.

#### `with_instrumentation_scope`

<pre />

Sets the instrumentation scope name used for emitted spans.

#### `with_mark_projection`

<pre />

Selects how point-in-time marks are represented in exported traces.

#### `with_mark_exclude_names`

<pre />

Excludes named marks from tool projection.

#### `with_attribute_mapping`

<pre />

Adds a projected OpenTelemetry attribute alias.

#### `with_attribute_mappings`

<pre />

Replaces projected OpenTelemetry attribute aliases.

#### `with_promote_metadata_prefixes`

<pre />

Selects literal Event metadata prefixes copied to OTLP attributes.

#### `with_promote_resource_metadata_prefixes`

<pre />

Selects literal root-scope Event metadata prefixes copied to OTLP resource attributes.

## Trait Implementations

### `impl Clone for OpenTelemetryConfig`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for OpenTelemetryConfig`

<pre />

#### `fmt`

<pre />