question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple SDK instances on a single page

See original GitHub issue

Hi!

We’re looking to use datadog-logs in a microfrontend application. Is it possible to have a several instances of datadog-logs on a single page (so the logs would be sent to different applicationIds)?

UPD: we might be able to get away with a single instance of DD, and contextualize the logging with the application name, so it’s logged in a central place, but we can filter out by the application.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
bcaudancommented, Dec 20, 2021

Hello @snaumov,

We don’t allow to use several instances of the SDK on the same page.

However, we are planning to address some use cases related to micro frontend approaches. The general idea would be to have a single instance of the SDK on the page tracking a single application but several services.

We’ll keep you posted when we we’ll have more details on that.

1reaction
PaulKujawacommented, Sep 14, 2022

Is there any updates on this, @bcaudan ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple instances on one page with Javascript - Stack Overflow
The only way to introduce a separate namespace in javascript is with a function call. This is how you do that:
Read more >
Web | Multiple Instances - mParticle documentation
We offer the ability to concurrently run multiple instances of mParticle on a single website. This allows you to send certain events to ......
Read more >
Use multiple TinyMCE instances in a single page | Docs
This section is about adding multiple editor instances to a single page. This is a common use case when using TinyMCE's inline mode....
Read more >
Using Multiple Instances of Author API - Learnosity Help
This code sample demonstrates how you can use a single instance of Author API with the public method moveInstanceTo. As Author API is...
Read more >
Multiple SDK implementations - Optimizely
In our example, we have a JavaScript single-page app ecommerce site, and we're running an experiment in our Python server code on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found