Skip to content

Commit

Permalink
Use generated trace ID instead of empty one
Browse files Browse the repository at this point in the history
Co-authored-by: tomer doron <tomer@apple.com>
  • Loading branch information
StefanNienhuis and tomerd committed Feb 18, 2022
1 parent 5369009 commit 2124e11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/AWSLambdaRuntimeCore/ControlPlaneRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ struct Invocation: Hashable {
self.requestID = requestID
self.deadlineInMillisSinceEpoch = unixTimeInMilliseconds
self.invokedFunctionARN = invokedFunctionARN
self.traceID = headers.first(name: AmazonHeaders.traceID) ?? ""
self.traceID = headers.first(name: AmazonHeaders.traceID) ??
"Root=\(AmazonHeaders.generateXRayTraceID());Sampled=0"
self.clientContext = headers["Lambda-Runtime-Client-Context"].first
self.cognitoIdentity = headers["Lambda-Runtime-Cognito-Identity"].first
}
Expand Down

0 comments on commit 2124e11

Please sign in to comment.