Skip to content

make logs work with browser shared environments #16691

Open
@sentry-io

Description

@sentry-io

Sentry Feedback: JAVASCRIPT-31TF

The instructions (https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/) are not super clear on how to use logs in shared environments. We'll run into this with microfrontends as well.

We should expand the browser logging methods to explicitly supply a scope.

For now users can wrap calls with withScope

withScope(scope, () => {
  Sentry.logger.info(...);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions