pub struct OpenTelemetryConfig {
pub endpoint: String,
pub headers: HeaderMap,
pub filter: EnvFilter,
pub max_batch_queue_size: usize,
pub max_export_batch_size: usize,
pub max_concurrent_exports: usize,
pub batch_scheduled_delay: Duration,
pub max_export_timeout: Duration,
pub resource: Resource,
}
Available on crate feature
tracing_
only.Expand description
Configuration for the opentelemetry
library.
Fields§
§endpoint: String
The OTLP/HTTP endpoint to export OpenTelemetry data to.
headers: HeaderMap
Additional headers to send with every request to the endpoint.
filter: EnvFilter
A filter which determines which events are exported.
max_batch_queue_size: usize
How many spans can be queued before dropping.
max_export_batch_size: usize
How many spans to process in a single batch
max_concurrent_exports: usize
How many concurrent export tasks to allow. More tasks can lead to more memory consumed by the exporter.
batch_scheduled_delay: Duration
Delay between consecutive batch exports.
max_export_timeout: Duration
How long to wait for a batch to be sent before dropping it.
resource: Resource
opentelemetry::sdk::resource::Resource
to include with all
traces.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for OpenTelemetryConfig
impl RefUnwindSafe for OpenTelemetryConfig
impl Send for OpenTelemetryConfig
impl Sync for OpenTelemetryConfig
impl Unpin for OpenTelemetryConfig
impl UnwindSafe for OpenTelemetryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request