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

use withScope to sentry's message logging? #93

Open
jahead opened this issue Apr 8, 2024 · 0 comments
Open

use withScope to sentry's message logging? #93

jahead opened this issue Apr 8, 2024 · 0 comments

Comments

@jahead
Copy link

jahead commented Apr 8, 2024

We are moving from our home-grown logging module to this one.

And we noticed the transport is limited.
We internally would do this.

    return Sentry.withScope(scope => {
      if (context?.extras) {
        scope.setExtras(context.extras);
      }
      if (context?.tags) {
        scope.setTags(context.tags);
      }

      scope.setLevel('warning');
      Sentry.captureMessage(message);
    });

obviously, currently the transports don't have extras's or tags but we could put the extension as a tag, and set the level correctly to allow better integration, would this useful to commit back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant