Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🙏 Proxied RUM session replay fails to load in the dashboard #2931

Open
mikepianka opened this issue Aug 9, 2024 · 2 comments
Open

🙏 Proxied RUM session replay fails to load in the dashboard #2931

mikepianka opened this issue Aug 9, 2024 · 2 comments

Comments

@mikepianka
Copy link

mikepianka commented Aug 9, 2024

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.

image

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.

image

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 v1 https://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)

@cy-moi
Copy link
Contributor

cy-moi commented Aug 12, 2024

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.

@mikepianka
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants