Struct Open Telemetry File Sink Config

View as Markdown

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.

pub struct OpenTelemetryFileSinkConfig {Show 19 fields
    pub otel_type: OpenTelemetryType,
    pub output_directory: PathBuf,
    pub filename: Option<String>,
    pub format: OtlpFileFormat,
    pub mode: String,
    pub mark_projection: MarkProjection,
    pub mark_exclude_names: Vec<String>,
    pub attribute_mappings: Vec<OtlpAttributeMapping>,
    pub promote_metadata_prefixes: Vec<String>,
    pub promote_resource_metadata_prefixes: Vec<String>,
    pub resource_attributes: HashMap<String, String>,
    pub service_name: String,
    pub service_namespace: Option<String>,
    pub service_version: Option<String>,
    pub instrumentation_scope: String,
    pub max_queue_size: Option<usize>,
    pub max_export_batch_size: Option<usize>,
    pub scheduled_delay_millis: Option<u64>,
    pub completed_span_context_ttl_millis: Option<u64>,
}

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

impl Clone for OpenTelemetryFileSinkConfig

clone

fn clone(&self) -> OpenTelemetryFileSinkConfig

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for OpenTelemetryFileSinkConfig

impl Debug for OpenTelemetryFileSinkConfig

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

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

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

deserialize

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

impl EditorConfig for OpenTelemetryFileSinkConfig

impl EditorConfig for OpenTelemetryFileSinkConfig

editor_schema

fn editor_schema() -> &'static EditorSchema

impl Serialize for OpenTelemetryFileSinkConfig

impl Serialize for OpenTelemetryFileSinkConfig

serialize

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,