[−][src]Struct opentelemetry_application_insights::Exporter
Application Insights span exporter
Implementations
impl Exporter
[src]
pub fn new(instrumentation_key: String) -> Self
[src]
Create a new exporter.
pub fn with_application_version(self, ver: String) -> Self
[src]
Add an application version to all telemetry items.
let exporter = opentelemetry_application_insights::Exporter::new("...".into()) .with_application_version(std::env!("CARGO_PKG_VERSION").into());
pub fn with_sample_rate(self, sample_rate: f64) -> Self
[src]
Set sample rate, which is passed through to Application Insights. It should be a value between 0 and 1 and match the rate given to the sampler.
Default: 1.0
let sample_rate = 0.3; let exporter = opentelemetry_application_insights::Exporter::new("...".into()) .with_sample_rate(sample_rate); let provider = sdk::Provider::builder() .with_simple_exporter(exporter) .with_config(sdk::Config { default_sampler: Box::new(sdk::Sampler::Probability(sample_rate)), ..Default::default() }) .build();
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Exporter
impl Send for Exporter
impl Sync for Exporter
impl Unpin for Exporter
impl UnwindSafe for Exporter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> FutureExt for T
[src]
fn with_context(self, otel_cx: Context) -> WithContext<Self>
[src]
fn with_current_context(self) -> WithContext<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,