Skip to content

Commit 30d9579

Browse files
authored
Merge branch 'aws:main' into tenant-id
2 parents a241d68 + 45c22d5 commit 30d9579

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lambda/invoke_loop.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ func handleInvoke(invoke *invoke, handler *handlerOptions) error {
6565

6666
// set the trace id
6767
traceID := invoke.headers.Get(headerTraceID)
68-
os.Setenv("_X_AMZN_TRACE_ID", traceID)
68+
if lambdacontext.MaxConcurrency() == 1 {
69+
os.Setenv("_X_AMZN_TRACE_ID", traceID)
70+
}
6971
// nolint:staticcheck
7072
ctx = context.WithValue(ctx, "x-amzn-trace-id", traceID)
7173

0 commit comments

Comments
 (0)