Struct Open Telemetry 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.

1pub struct OpenTelemetryConfig { /* private fields */ }

Configuration for the OpenTelemetry subscriber.

Implementations

impl OpenTelemetryConfig

impl OpenTelemetryConfig

http_binary

pub fn http_binary(service_name: impl Into<String>) -> Self

Creates an HTTP OTLP config for the given service name.

grpc

pub fn grpc(service_name: impl Into<String>) -> Self

Creates a gRPC OTLP config for the given service name.

with_endpoint

pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self

Overrides the OTLP endpoint. If unset, exporter defaults and OTEL_* env vars apply.

with_header

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

Adds a header/metadata entry for the exporter.

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_timeout

pub fn with_timeout(self, timeout: Duration) -> Self

Sets the OTLP request timeout.

with_service_namespace

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

Sets the service namespace resource attribute.

with_service_version

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

Sets the service version resource attribute.

with_instrumentation_scope

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

Sets the instrumentation scope name used for emitted spans.

with_mark_projection

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

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

with_mark_exclude_names

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

Excludes named marks from tool projection while preserving their native event representation. The default excludes high-volume llm.chunk marks.

with_attribute_mapping

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

Adds a typed attribute copy after event payload projection.

with_attribute_mappings

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

Replaces the configured typed attribute copies.

Trait Implementations

impl Clone for OpenTelemetryConfig

impl Clone for OpenTelemetryConfig

clone

fn clone(&self) -> OpenTelemetryConfig

clone_from

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

impl Debug for OpenTelemetryConfig

impl Debug for OpenTelemetryConfig

fmt

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

impl Default for OpenTelemetryConfig

impl Default for OpenTelemetryConfig

default

fn default() -> Self