Open mikepianka opened 3 months ago
Hi @mikepianka , Thank you for reaching out to us. As you are using AWS API Gateway, could you give us some additional information on how it was configured or double check your configuration? We suspect that their service might have modified the body before sending to Datadog intake.
Here is the documentation on how to configure the AWS service so the body is untouched regardless of the request headers.
Yeah it does seem that API Gateway could be altering the request body. I'm using a HTTP API with the Lambda proxy integration, setup through AWS SAM. I am guessing the issue is related to setting the media type settings on the API along with potentially returning the payload from the Lambda in base64, but the docs and what I can find online really don't point to a clear combination of settings that would work.
What are you trying to achieve and what is your issue? Please describe. I have setup a RUM proxy using AWS API Gateway and Lambda. The proxy is working as expected for basic RUM events and I can see the session information showing up in the DataDog website's RUM dashboard and session explorer. I am not getting any errors for the proxy requests and am getting the expected 202 Accepted responses back from the DataDog intake.
The weird problem I am having though is that when I try to view the Session Replay on the DataDog website I will get the following error message and the console has errors mentioning that content decoding failed.
Describe the solution you'd like I want to know what the problem is to get the proxy fully working.
Describe alternatives you've considered I did try manually altering the proxy response body before sending it to the DataDog intake URL, like base64 encoding it, and in those cases it does cause the DataDog intake to start throwing back errors about a bad request. So it is strange the DataDog intake is accepting the data but can't display the replays in the dashboard.
Something else I noticed but am not sure if it has any significance is that the replay ddforward values the RUM proxy generates have v2 in them like
ddforward=%2Fapi%2Fv2%2Freplay
but the console decode errors from the DataDog dashboard are referencing v1https://app.datadoghq.com/api/v1/rum/replay/sessions/adefccd9-0ecb-42e1-bd51-93507bed497e/views/c8dde8df-08eb-461a-bd43-d8b91fcdcce2/segments?max_list_size=512000&is_forcing_sync_fetch=false&ts=1723233862417 net::ERR_CONTENT_DECODING_FAILED 200 (OK)