pub struct OpenTelemetryLayer<F> { /* private fields */ }
Expand description
Tower layer to add OpenTelemetry tracing to a Lambda function invocation. The layer accepts a function to flush OpenTelemetry after the end of the invocation.
Implementations§
Source§impl<F> OpenTelemetryLayer<F>
impl<F> OpenTelemetryLayer<F>
Sourcepub fn new(flush_fn: F) -> Self
pub fn new(flush_fn: F) -> Self
Create a new OpenTelemetryLayer with the provided flush function.
Sourcepub fn with_trigger(self, trigger: OpenTelemetryFaasTrigger) -> Self
pub fn with_trigger(self, trigger: OpenTelemetryFaasTrigger) -> Self
Configure the faas.trigger
attribute of the OpenTelemetry span.
Trait Implementations§
Source§impl<S, F> Layer<S> for OpenTelemetryLayer<F>
impl<S, F> Layer<S> for OpenTelemetryLayer<F>
Auto Trait Implementations§
impl<F> Freeze for OpenTelemetryLayer<F>where
F: Freeze,
impl<F> RefUnwindSafe for OpenTelemetryLayer<F>where
F: RefUnwindSafe,
impl<F> Send for OpenTelemetryLayer<F>where
F: Send,
impl<F> Sync for OpenTelemetryLayer<F>where
F: Sync,
impl<F> Unpin for OpenTelemetryLayer<F>where
F: Unpin,
impl<F> UnwindSafe for OpenTelemetryLayer<F>where
F: UnwindSafe,
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