Struct Open Telemetry LogConfig

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

Configuration for an OTLP log subscriber.

Implementations

impl OpenTelemetryLogConfig

impl OpenTelemetryLogConfig

new

pub fn new(endpoint: impl Into<String>) -> Self

Create a log exporter for a required OTLP endpoint.

with_transport

pub fn with_transport(self, transport: OtlpTransport) -> Self

Select the OTLP transport.

with_header

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

Add an exporter header or gRPC metadata entry.

with_resource_attribute

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

Add an OpenTelemetry resource attribute.

with_service_name

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

Set the service.name resource attribute.

with_service_namespace

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

Set the optional service.namespace resource attribute.

with_service_version

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

Set the optional service.version resource attribute.

with_instrumentation_scope

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

Set the instrumentation scope name.

with_timeout

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

Set the OTLP request timeout.

with_minimum_severity

pub fn with_minimum_severity(self, severity: LogSeverity) -> Self

Set the minimum mark severity exported as a log.

with_max_queue_size

pub fn with_max_queue_size(self, max_queue_size: usize) -> Self

Set the maximum queued log records.

with_max_export_batch_size

pub fn with_max_export_batch_size(self, max_export_batch_size: usize) -> Self

Set the maximum records in one export batch.

with_scheduled_delay

pub fn with_scheduled_delay(self, delay: Duration) -> Self

Set the maximum delay before exporting a partial batch.

Trait Implementations

impl Clone for OpenTelemetryLogConfig

impl Clone for OpenTelemetryLogConfig

clone

fn clone(&self) -> OpenTelemetryLogConfig

clone_from

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

impl Debug for OpenTelemetryLogConfig

impl Debug for OpenTelemetryLogConfig

fmt

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