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 { /* private fields */ }

Configuration for an OpenTelemetry subscriber writing OTLP to a local file.

Carries no endpoint, transport, headers, or timeout: a file destination has no use for any of them, so they are absent rather than rejected.

Implementations

impl OpenTelemetryFileSinkConfig

impl OpenTelemetryFileSinkConfig

with_service_name

pub fn with_service_name(self, service_name: impl Into<String>) -> Self

Sets the service.name resource attribute.

with_service_namespace

pub fn with_service_namespace(self, namespace: impl Into<String>) -> Self

Sets the optional service.namespace resource attribute.

with_service_version

pub fn with_service_version(self, version: impl Into<String>) -> Self

Sets the optional service.version resource attribute.

with_instrumentation_scope

pub fn with_instrumentation_scope(self, scope: impl Into<String>) -> Self

Sets the instrumentation scope name.

with_resource_attribute

pub fn with_resource_attribute(
    self,
    key: impl Into<String>,
    value: impl Into<String>,
) -> Self

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

with_mark_projection

pub fn with_mark_projection(self, mark_projection: MarkProjection) -> Self

Selects how point-in-time marks are represented.

with_mark_exclude_names

pub fn with_mark_exclude_names<I, S>(self, names: I) -> Selfwhere
    I: IntoIterator<Item = S>,
    S: Into<String>,

Replaces the mark names excluded from tool projection.

with_attribute_mapping

pub fn with_attribute_mapping(
    self,
    key: impl Into<String>,
    alias: impl Into<String>,
) -> Self

Copies a projected attribute to a second attribute name.

with_attribute_mappings

pub fn with_attribute_mappings<I>(self, mappings: I) -> Selfwhere
    I: IntoIterator<Item = OtlpAttributeMapping>,

Replaces the projected attribute aliases.

with_promote_metadata_prefixes

pub fn with_promote_metadata_prefixes<I, S>(self, prefixes: I) -> Selfwhere
    I: IntoIterator<Item = S>,
    S: Into<String>,

Replaces the Event metadata prefixes copied to span attributes.

with_promote_resource_metadata_prefixes

pub fn with_promote_resource_metadata_prefixes<I, S>(self, prefixes: I) -> Selfwhere
    I: IntoIterator<Item = S>,
    S: Into<String>,

Replaces the root-scope metadata prefixes copied to resource attributes.

with_completed_span_context_ttl

pub fn with_completed_span_context_ttl(self, ttl: Duration) -> Self

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

impl OpenTelemetryFileSinkConfig

impl OpenTelemetryFileSinkConfig

new

pub fn new(otel_type: OpenTelemetryType, sink: OtlpFileSinkSettings) -> Self

Creates a config writing OTLP to the file sink describes.

sink

pub fn sink(&self) -> &OtlpFileSinkSettings

Returns the file this config writes to.

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