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

Support Multiple Datadog Browser Log Instances with Independent Session Management #3121

Open
naseemkullah opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@naseemkullah
Copy link

Problem Statement

In monolithic frontend applications where multiple teams require distinct Datadog browser log instances, the current session management (based on a shared cookie) prevents setting unique sample rates and configurations for each instance. This limitation affects our ability to monitor different functionalities independently, as the sample rate and session data are applied globally across all instances, rather than on a per-instance basis.

Proposed Solution

Introduce a cookieName or namespace parameter for datadogLogs.init, allowing each instance to maintain isolated session data, sample rates, and configurations. By providing unique identifiers, teams could independently monitor specific functionalities without global session overlap.

Potential API:

datadogLogs.init({
  clientToken: 'your-client-token',
  site: 'datadoghq.com',
  service: 'my-service',
  sampleRate: 50,
  cookieName: 'dd_logs_teamA', // Custom cookie for team A's logs
  namespace: 'teamA_logs',     // Alternative: unique namespace
});

This change would enhance Datadog's usability for large, multi-team applications by supporting more granular, instance-specific logging configurations.

@naseemkullah naseemkullah added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant