#[non_exhaustive]pub enum OTelFaasTrigger {
Datasource,
Http,
PubSub,
Timer,
Other,
}Expand description
The value of the OpenTelemetry faas.trigger attribute for a Lambda invocation.
Pass a variant to TracingLayer::with_trigger to describe what kind of
event triggers your Lambda function. The value is set on the per-invocation
span as the faas.trigger attribute.
The default variant is Datasource, which is appropriate for Lambda
functions that read from or write to a data store such as DynamoDB or S3.
See the OTel FaaS attributes registry for the full specification.
§Examples
use awssdk_instrumentation::lambda::OTelFaasTrigger;
assert_eq!(OTelFaasTrigger::Datasource.to_string(), "datasource");
assert_eq!(OTelFaasTrigger::Http.to_string(), "http");
assert_eq!(OTelFaasTrigger::PubSub.to_string(), "pubsub");
assert_eq!(OTelFaasTrigger::Timer.to_string(), "timer");
assert_eq!(OTelFaasTrigger::Other.to_string(), "other");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Datasource
A response to a data source operation such as a database or filesystem read/write.
This is the default. Use it for Lambda functions triggered by DynamoDB Streams, S3 events, or other data-store events.
Http
A response to an inbound HTTP request.
Use this for Lambda functions fronted by API Gateway or a Function URL.
PubSub
A function invoked when messages are sent to a messaging system.
Use this for Lambda functions triggered by SQS, SNS, or EventBridge.
Timer
A function scheduled to run at regular intervals.
Use this for Lambda functions triggered by EventBridge Scheduler or CloudWatch Events rules.
Other
None of the other trigger types apply.
Trait Implementations§
Source§impl Clone for OTelFaasTrigger
impl Clone for OTelFaasTrigger
Source§fn clone(&self) -> OTelFaasTrigger
fn clone(&self) -> OTelFaasTrigger
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OTelFaasTrigger
impl Debug for OTelFaasTrigger
Source§impl Default for OTelFaasTrigger
impl Default for OTelFaasTrigger
Source§fn default() -> OTelFaasTrigger
fn default() -> OTelFaasTrigger
Source§impl Display for OTelFaasTrigger
Formats the trigger as the lowercase string value used in the faas.trigger
OTel attribute (e.g. "datasource", "http").
impl Display for OTelFaasTrigger
Formats the trigger as the lowercase string value used in the faas.trigger
OTel attribute (e.g. "datasource", "http").
impl Copy for OTelFaasTrigger
Auto Trait Implementations§
impl Freeze for OTelFaasTrigger
impl RefUnwindSafe for OTelFaasTrigger
impl Send for OTelFaasTrigger
impl Sync for OTelFaasTrigger
impl Unpin for OTelFaasTrigger
impl UnsafeUnpin for OTelFaasTrigger
impl UnwindSafe for OTelFaasTrigger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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