designcourse icon indicating copy to clipboard operation
designcourse copied to clipboard

🙏 How to disable cookie?

Open alexeychikk opened this issue 1 year ago • 1 comments
trafficstars

What are you trying to achieve and what is your issue? Please describe. I am using @datadog/browser-logs with custom proxy, therefore I do not need the SDK to set _dd_s cookie. How do I disable _dd_s cookie?

Describe the solution you'd like I want to use datadogLogs with custom proxy but without _dd_s cookie?

alexeychikk avatar Nov 20 '24 09:11 alexeychikk

Hello @alexeychikk, The @datadog/browser-logs SDK does compute and store the session id in the cookie like the @datadog/browser-rum. This allowing grouping your logs by session id @session.id:.... We currently don't support disabling the session management for logs. I’ll keep you informed if there are any updates.

amortemousque avatar Dec 10 '24 16:12 amortemousque

👋 Hi there,

Since v5.35.0, you can use datadogLogs.init({ ..., sessionPersistence: 'local-storage' }) to use the local storage instead of cookies for sessions. See docs.

Disabling session persistence is not yet supported.

BenoitZugmeyer avatar May 19 '25 13:05 BenoitZugmeyer