> This page is for NeMo Relay, version Latest (v0.10.0) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v0.10.0) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.10.0: https://docs.nvidia.com/nemo/relay/v0.10.0/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt
> - v0.6.0: https://docs.nvidia.com/nemo/relay/v0.6.0/llms.txt
> - v0.5.0: https://docs.nvidia.com/nemo/relay/v0.5.0/llms.txt

> 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 File Sink Config

> One local file destination for projected OTLP spans.

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`.

<pre />

One local file destination for projected OTLP spans.

A file sink writes the same `ExportTraceServiceRequest` an OTLP endpoint would receive, so a consumer that reads trajectories as artifacts needs no collector. It shares the projection and batching settings with [`OpenTelemetryEndpointConfig`](/reference/api/rust-library-reference/nemo-relay/observability/plugin_component/struct-opentelemetryendpointconfig) and drops the fields that only a network destination has: endpoint, transport, headers, and timeout.

## Fields

### `otel_type: OpenTelemetryType`

Semantic projection written to this file.

### `output_directory: PathBuf`

Directory containing the output file.

### `filename: Option<String>`

Output filename. Defaults to a timestamped name for the chosen format.

### `format: OtlpFileFormat`

On-disk encoding: `json_lines` or `proto`.

### `mode: String`

File open mode: `append` or `overwrite`.

### `mark_projection: MarkProjection`

Representation used for point-in-time marks.

### `mark_exclude_names: Vec<String>`

Mark names excluded from tool projection.

### `attribute_mappings: Vec<OtlpAttributeMapping>`

Projected attributes copied to aliases.

### `promote_metadata_prefixes: Vec<String>`

Literal Event metadata prefixes copied to top-level OTLP attributes.

### `promote_resource_metadata_prefixes: Vec<String>`

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

### `resource_attributes: HashMap<String, String>`

Extra resource attributes.

### `service_name: String`

`service.name` resource attribute.

### `service_namespace: Option<String>`

Optional `service.namespace` resource attribute.

### `service_version: Option<String>`

Optional `service.version` resource attribute.

### `instrumentation_scope: String`

Instrumentation scope name.

### `max_queue_size: Option<usize>`

Maximum completed spans buffered before the sink drops new spans.

### `max_export_batch_size: Option<usize>`

Maximum spans written in one batch.

### `scheduled_delay_millis: Option<u64>`

Maximum delay before writing a non-full batch, in milliseconds.

### `completed_span_context_ttl_millis: Option<u64>`

How long completed scopes retain trace context for late marks, in milliseconds.

## Trait Implementations

### `impl Clone for OpenTelemetryFileSinkConfig`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for OpenTelemetryFileSinkConfig`

<pre />

#### `fmt`

<pre />

### `impl<'de> Deserialize<'de> for OpenTelemetryFileSinkConfig`

<pre />

#### `deserialize`

<pre />

### `impl EditorConfig for OpenTelemetryFileSinkConfig`

<pre />

#### `editor_schema`

<pre />

### `impl Serialize for OpenTelemetryFileSinkConfig`

<pre />

#### `serialize`

<pre />