pub struct ApiGatewayV2Extractor;Expand description
Extractor for API Gateway HTTP API (v2) events.
Extracts trace context from HTTP headers using the globally configured
OpenTelemetry propagator. Falls back to the _X_AMZN_TRACE_ID environment
variable if no valid trace context is found in headers.
Configure the propagator via opentelemetry::global::set_text_map_propagator().
§Example
ⓘ
use opentelemetry_lambda_tower::{OtelTracingLayer, ApiGatewayV2Extractor};
let layer = OtelTracingLayer::new(ApiGatewayV2Extractor::new());Implementations§
Trait Implementations§
Source§impl Clone for ApiGatewayV2Extractor
impl Clone for ApiGatewayV2Extractor
Source§fn clone(&self) -> ApiGatewayV2Extractor
fn clone(&self) -> ApiGatewayV2Extractor
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 moreSource§impl Debug for ApiGatewayV2Extractor
impl Debug for ApiGatewayV2Extractor
Source§impl Default for ApiGatewayV2Extractor
impl Default for ApiGatewayV2Extractor
Source§fn default() -> ApiGatewayV2Extractor
fn default() -> ApiGatewayV2Extractor
Returns the “default value” for a type. Read more
Source§impl TraceContextExtractor<ApiGatewayV2httpRequest> for ApiGatewayV2Extractor
impl TraceContextExtractor<ApiGatewayV2httpRequest> for ApiGatewayV2Extractor
Source§fn extract_context(&self, event: &ApiGatewayV2httpRequest) -> Context
fn extract_context(&self, event: &ApiGatewayV2httpRequest) -> Context
Extracts parent context for creating child spans. Read more
Source§fn trigger_type(&self) -> &'static str
fn trigger_type(&self) -> &'static str
Returns the FaaS trigger type for semantic conventions. Read more
Source§fn span_name(
&self,
event: &ApiGatewayV2httpRequest,
lambda_ctx: &LambdaContext,
) -> String
fn span_name( &self, event: &ApiGatewayV2httpRequest, lambda_ctx: &LambdaContext, ) -> String
Generates span name based on event and Lambda context. Read more
Source§fn record_attributes(&self, event: &ApiGatewayV2httpRequest, span: &Span)
fn record_attributes(&self, event: &ApiGatewayV2httpRequest, span: &Span)
Records event-specific attributes on the span. Read more
Auto Trait Implementations§
impl Freeze for ApiGatewayV2Extractor
impl RefUnwindSafe for ApiGatewayV2Extractor
impl Send for ApiGatewayV2Extractor
impl Sync for ApiGatewayV2Extractor
impl Unpin for ApiGatewayV2Extractor
impl UnwindSafe for ApiGatewayV2Extractor
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