pub struct AppInsightsComplete<P, E> { /* private fields */ }
Expand description
The complete AppInsights
builder struct.
This struct is returned from AppInsights::build_and_set_global_default
, and it is used to create the AppInsightsLayer
.
Implementations§
Source§impl<P, E> AppInsightsComplete<P, E>
impl<P, E> AppInsightsComplete<P, E>
Sourcepub fn layer(self) -> AppInsightsLayer<P, E>
pub fn layer(self) -> AppInsightsLayer<P, E>
Creates the telemetry layer.
use axum::Router;
use axum_insights::{AppInsights, AppInsightsComplete};
let i: AppInsightsComplete<_, _> = AppInsights::default()
.with_connection_string(None)
.with_service_config("namespace", "name", "servername")
.build_and_set_global_default()
.unwrap();
let layer = i.layer();
// You likely will not need to specify `Router<()>` in your implementation. This is just for the example.
let app: Router<()> = Router::new()
// ...
.layer(layer);
Auto Trait Implementations§
impl<P, E> Freeze for AppInsightsComplete<P, E>
impl<P, E> !RefUnwindSafe for AppInsightsComplete<P, E>
impl<P, E> Send for AppInsightsComplete<P, E>where
E: Send,
impl<P, E> Sync for AppInsightsComplete<P, E>where
E: Sync,
impl<P, E> Unpin for AppInsightsComplete<P, E>where
E: Unpin,
impl<P, E> !UnwindSafe for AppInsightsComplete<P, E>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more