DataDog / datadog-lambda-js

The Datadog AWS Lambda Library for Node
Apache License 2.0
113 stars 35 forks source link

Empty array somehow is not shown in the Lambda response when capturing Lambda payloads #386

Closed rdsedmundo closed 1 year ago

rdsedmundo commented 1 year ago

Expected Behavior

function.response.body should be set to [].

Actual Behavior

Screenshot 2023-04-26 at 3 20 10 PM

I matched the requests via AWS's Lambda Request ID so I'm sure they're referring to the same request. The same endpoint is working fine for requests that return data in the array: body[*].A, body[*].B, etc gets filled correctly.

Steps to Reproduce the Problem

  1. Return an empty array from a Lambda using an HTTP API integration.

It's very hard for me to pinpoint if the bug really is here in this lib, as the bug can be on Datadog's own FE dashboard / API, etc.

Specifications

Stacktrace

N/A.

astuyve commented 1 year ago

Hi @rdsedmundo - thanks for reaching out!

Datadog APM span tags which contain no values (or null/undefined values) are not indexed, which is why this is not being shown. Unfortunately this library doesn't control that, however you could open a feature request with our support team if you'd like to request this.

Thanks! AJ