File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,9 @@ where
158
158
trace ! ( "{}" , std:: str :: from_utf8( & body) ?) ; // this may be very verbose
159
159
let body = serde_json:: from_slice ( & body) ?;
160
160
161
+ let xray_trace_id = & ctx. xray_trace_id . clone ( ) ;
162
+ env:: set_var ( "_X_AMZN_TRACE_ID" , xray_trace_id) ;
163
+
161
164
let request_id = & ctx. request_id . clone ( ) ;
162
165
let task = panic:: catch_unwind ( panic:: AssertUnwindSafe ( || handler. call ( body, ctx) ) ) ;
163
166
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl TryFrom<HeaderMap> for Context {
139
139
. to_owned ( ) ,
140
140
xray_trace_id : headers
141
141
. get ( "lambda-runtime-trace-id" )
142
- . unwrap_or ( & HeaderValue :: from_static ( "No header lambda-runtime-trace-id found. " ) )
142
+ . unwrap_or ( & HeaderValue :: from_static ( "" ) )
143
143
. to_str ( ) ?
144
144
. to_owned ( ) ,
145
145
..Default :: default ( )
You can’t perform that action at this time.
0 commit comments