mowispace/react-native-logs

use withScope to sentry's message logging?

Opened this issue · 0 comments

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?