Skip to content

Commit cee5807

Browse files
committed
Fix consumer spans semconv
1 parent 34aa552 commit cee5807

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/middleware/lambda/context.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::semconv;
21
use lambda_runtime::LambdaInvocation;
32
use opentelemetry::trace::SpanKind;
43
use opentelemetry_sdk::trace::TracerProvider;
@@ -10,6 +9,11 @@ use super::{
109
OtelLambdaLayer,
1110
};
1211

12+
mod semconv {
13+
pub use crate::semconv::*;
14+
pub const MESSAGING_DESTINATION_PUBLISH_NAME: &str = "messaging.destination_publish.name";
15+
}
16+
1317
pub trait LambdaServiceContext {
1418
fn create_span(&self, req: &LambdaInvocation, coldstart: bool) -> Span;
1519
}
@@ -62,7 +66,7 @@ lambda_service!(
6266
Consumer,
6367
PubSubLambdaService {
6468
MESSAGING_SYSTEM: Value,
65-
MESSAGING_DESTINATION_NAME: OptionalValue,
69+
MESSAGING_DESTINATION_PUBLISH_NAME: OptionalValue,
6670
},
6771
{ semconv::MESSAGING_OPERATION } = "process",
6872
);

0 commit comments

Comments
 (0)