Struct Open Telemetry File Sink Config
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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 {
pub shared: SharedTraceOptions,
pub sink: OtlpFileSinkSettings,
}
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.
Fields
shared: SharedTraceOptions
sink: OtlpFileSinkSettings
Implementations
impl OpenTelemetryFileSinkConfig
impl OpenTelemetryFileSinkConfig
with_service_name
pub fn with_service_name(
self,
service_name: impl Into<String>,
) -> OpenTelemetryFileSinkConfig
Sets the service.name resource attribute.
with_service_namespace
pub fn with_service_namespace(
self,
namespace: impl Into<String>,
) -> OpenTelemetryFileSinkConfig
Sets the optional service.namespace resource attribute.
with_service_version
pub fn with_service_version(
self,
version: impl Into<String>,
) -> OpenTelemetryFileSinkConfig
Sets the optional service.version resource attribute.
with_instrumentation_scope
pub fn with_instrumentation_scope(
self,
scope: impl Into<String>,
) -> OpenTelemetryFileSinkConfig
Sets the instrumentation scope name.
with_resource_attribute
pub fn with_resource_attribute(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> OpenTelemetryFileSinkConfig
Adds a resource attribute as a string key/value pair.
with_mark_projection
pub fn with_mark_projection(
self,
mark_projection: MarkProjection,
) -> OpenTelemetryFileSinkConfig
Selects how point-in-time marks are represented.
with_mark_exclude_names
pub fn with_mark_exclude_names<I, S>(
self,
names: I,
) -> OpenTelemetryFileSinkConfigwhere
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>,
) -> OpenTelemetryFileSinkConfig
Copies a projected attribute to a second attribute name.
with_attribute_mappings
pub fn with_attribute_mappings<I>(
self,
mappings: I,
) -> OpenTelemetryFileSinkConfigwhere
I: IntoIterator<Item = OtlpAttributeMapping>,
Replaces the projected attribute aliases.
with_promote_metadata_prefixes
pub fn with_promote_metadata_prefixes<I, S>(
self,
prefixes: I,
) -> OpenTelemetryFileSinkConfigwhere
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,
) -> OpenTelemetryFileSinkConfigwhere
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,
) -> OpenTelemetryFileSinkConfig
Sets how long completed scopes retain trace context for late marks.
impl OpenTelemetryFileSinkConfig
impl OpenTelemetryFileSinkConfig
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<(), Error>