[][src]Trait opentelemetry_application_insights::HttpClient

pub trait HttpClient: Debug + Send + Sync {
#[must_use]    fn send<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Vec<u8>>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

HTTP client used by the exporter to send telemetry to Application Insights

This trait can be implemented for different async runtimes, which makes the exporter agnostic to any runtime the user may choose.

Required methods

#[must_use]fn send<'life0, 'async_trait>(
    &'life0 self,
    request: Request<Vec<u8>>
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Send telemetry to Application Insights

This may fail if it can't connect to the server or if the request cannot be completed due to redirects. In those cases the exporter will retry the request.

Loading content...

Implementations on Foreign Types

impl HttpClient for Client[src]

HttpClient implementation for reqwest::Client

Requires the reqwest-client feature.

impl HttpClient for Client[src]

HttpClient implementation for reqwest::blocking::Client

Requires the reqwest-blocking-client feature.

impl HttpClient for Client[src]

HttpClient implementation for surf::Client

Requires the surf-client feature.

Loading content...

Implementors

Loading content...