Skip to content

Commit 6a9754f

Browse files
feat(otel): add span kind support to Lambda invocation tracing
1 parent a1f8c05 commit 6a9754f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lambda-runtime/src/layers/otel.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::LambdaInvocation;
44
use opentelemetry_semantic_conventions::trace as traceconv;
55
use pin_project::pin_project;
66
use tower::{Layer, Service};
7-
use tracing::{instrument::Instrumented, Instrument};
7+
use tracing::{instrument::Instrumented, Instrument, field};
88

99
/// Tower layer to add OpenTelemetry tracing to a Lambda function invocation. The layer accepts
1010
/// a function to flush OpenTelemetry after the end of the invocation.
@@ -75,6 +75,7 @@ where
7575
let span = tracing::info_span!(
7676
"Lambda function invocation",
7777
"otel.name" = req.context.env_config.function_name,
78+
"otel.kind" = field::Empty,
7879
{ traceconv::FAAS_TRIGGER } = &self.otel_attribute_trigger,
7980
{ traceconv::FAAS_INVOCATION_ID } = req.context.request_id,
8081
{ traceconv::FAAS_COLDSTART } = self.coldstart

0 commit comments

Comments
 (0)