Struct Open Telemetry Metric Config
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.
Configuration for an OTLP metric subscriber.
Implementations
impl OpenTelemetryMetricConfig
impl OpenTelemetryMetricConfig
new
pub fn new(endpoint: impl Into<String>) -> Self
Create a metric 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_export_interval
pub fn with_export_interval(self, interval: Duration) -> Self
Set the interval between metric collections.
with_temporality
pub fn with_temporality(self, temporality: MetricTemporality) -> Self
Set the preferred aggregation temporality.
with_max_instruments
pub fn with_max_instruments(self, max_instruments: usize) -> Self
Set the maximum number of distinct instrument names retained by this endpoint.
with_cardinality_limit
pub fn with_cardinality_limit(self, cardinality_limit: usize) -> Self
Set the SDK series cardinality limit per instrument.
Trait Implementations
impl Clone for OpenTelemetryMetricConfig
impl Clone for OpenTelemetryMetricConfig
clone
fn clone(&self) -> OpenTelemetryMetricConfig
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for OpenTelemetryMetricConfig
impl Debug for OpenTelemetryMetricConfig
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result