Skip to content

Commit 5369993

Browse files
committed
Add sns factory function for OtelLambdaLayer
1 parent d42b0fd commit 5369993

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/middleware/lambda/context.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ impl OtelLambdaLayer<GenericLambdaService> {
107107
}
108108

109109
impl OtelLambdaLayer<PubSubLambdaService> {
110-
pub fn sqs(provider: TracerProvider, topic_arn: impl Into<StringValue>) -> Self {
111-
Self::pubsub(provider, "AmazonSQS", Some(topic_arn))
110+
pub fn sqs(provider: TracerProvider, queue_arn: impl Into<StringValue>) -> Self {
111+
Self::pubsub(provider, "AmazonSQS", Some(queue_arn))
112+
}
113+
}
114+
115+
impl OtelLambdaLayer<PubSubLambdaService> {
116+
pub fn sns(provider: TracerProvider, topic_arn: impl Into<StringValue>) -> Self {
117+
Self::pubsub(provider, "AmazonSNS", Some(topic_arn))
112118
}
113119
}

0 commit comments

Comments
 (0)