pub struct OtelCollectorOptions {
pub url: Url,
pub headers: HashMap<String, String>,
pub metric_periodicity: Duration,
pub metric_temporality: MetricTemporality,
pub global_tags: HashMap<String, String>,
pub use_seconds_for_durations: bool,
pub histogram_bucket_overrides: HistogramBucketOverrides,
pub protocol: OtlpProtocol,
}Expand description
Options for exporting to an OpenTelemetry Collector
Fields§
§url: UrlThe url of the OTel collector to export telemetry and metrics to. Lang SDK should also export to this same collector.
headers: HashMap<String, String>Optional set of HTTP headers to send to the Collector, e.g for authentication.
metric_periodicity: DurationOptionally specify how frequently metrics should be exported. Defaults to 1 second.
metric_temporality: MetricTemporalitySpecifies the aggregation temporality for metric export. Defaults to cumulative.
A map of tags to be applied to all metrics
use_seconds_for_durations: boolIf set to true, use f64 seconds for durations instead of u64 milliseconds
histogram_bucket_overrides: HistogramBucketOverridesOverrides for histogram buckets. Units depend on the value of use_seconds_for_durations.
protocol: OtlpProtocolProtocol to use for communication with the collector
Implementations§
Source§impl OtelCollectorOptions
impl OtelCollectorOptions
Sourcepub fn builder() -> OtelCollectorOptionsBuilder
pub fn builder() -> OtelCollectorOptionsBuilder
Create an instance of OtelCollectorOptions using the builder syntax
Trait Implementations§
Source§impl Clone for OtelCollectorOptions
impl Clone for OtelCollectorOptions
Source§fn clone(&self) -> OtelCollectorOptions
fn clone(&self) -> OtelCollectorOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OtelCollectorOptions
impl RefUnwindSafe for OtelCollectorOptions
impl Send for OtelCollectorOptions
impl Sync for OtelCollectorOptions
impl Unpin for OtelCollectorOptions
impl UnsafeUnpin for OtelCollectorOptions
impl UnwindSafe for OtelCollectorOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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