File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " datadog-lambda-js" ,
3
- "version" : " 4.63 .0" ,
3
+ "version" : " 4.64 .0" ,
4
4
"description" : " Lambda client library that supports hybrid tracing in node js" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -136,16 +136,16 @@ export function datadog<TEvent, TResult>(
136
136
try {
137
137
localResult = await promHandler ( localEvent , localContext ) ;
138
138
} finally {
139
+ if ( traceListener . currentSpan && finalConfig . captureLambdaPayload ) {
140
+ tagObject ( traceListener . currentSpan , "function.request" , localEvent ) ;
141
+ tagObject ( traceListener . currentSpan , "function.response" , localResult ) ;
142
+ }
139
143
if ( traceListener . triggerTags ) {
140
144
const statusCode = extractHTTPStatusCodeTag ( traceListener . triggerTags , localResult ) ;
141
145
if ( statusCode ) {
142
146
// Store the status tag in the listener to send to Xray on invocation completion
143
147
traceListener . triggerTags [ "http.status_code" ] = statusCode ;
144
148
if ( traceListener . currentSpan ) {
145
- if ( finalConfig . captureLambdaPayload ) {
146
- tagObject ( traceListener . currentSpan , "function.request" , localEvent ) ;
147
- tagObject ( traceListener . currentSpan , "function.response" , localResult ) ;
148
- }
149
149
traceListener . currentSpan . setTag ( "http.status_code" , statusCode ) ;
150
150
}
151
151
}
You can’t perform that action at this time.
0 commit comments