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

🐛 Browser SDK does not initialize correctly if config for RUM and Logs is not perfectly in sync #3136

Open
thuringia opened this issue Nov 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@thuringia
Copy link

Describe the bug
This issue seems to primarily affect RUM, but should apply to Logs as well.
I detected it in our application because RUM did not initialize correctly.

The issue is that if only one of the SDKs is configured with trackSessionAcrossSubdomains the required _dd_s cookie exists twice. This leads to inconsistent behavior.
Logs appears to initialize just fine, and will send data to the intake.
Rum does not:

  • the browser extension shows the correct data in configuration
  • but internal context shows up as emtpy
  • similarly User is also empty, even if datadogRum.setUser is called.

When running RUM and Logs from CDN, calling window.DD_RUM.getInternalContext() returns undefined

This behavior does not appear to fully prevent RUM from initializing, a small set of users did continue to send/create RUM data.
In our case it looked to be about 10%.

To Reproduce
Steps to reproduce the behavior:

  1. Set up logs SDK
  2. Set up RUM SDK
  3. Activate trackSessionAcrossSubdomains in RUM
  4. RUM will stop working

Expected behavior
I think the docs should be updated to mention that this setting in particular needs to be in sync.
Additionally a real error, or debug message would be nice, if the SDK detects an inconsistent config, or fails to initialize at all.

Big thank you for making the Chrome extension, it was extremely helpful in debugging this!

@thuringia thuringia added the bug Something isn't working label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant