Emitting message from captureMessage()

The Sentry documentation, here says:

Another common operation is to capture a bare message. A message is textual information that should be sent to Sentry. Typically messages are not emitted, but they can be useful for some teams.

So can the captureMessage() event be emitted? If it is put in a warning scope would it alert when sent? Example warning scope:

      Sentry.withScope(scope => {
        scope.setTag('tag', 'tags are fun');
        scope.setTag('scope', 'More tags');
        scope.setContext('Context example label', {
        Sentry.captureMessage('My important message I want to know about');

Is this a valid use of Sentry or does that captureMessage need to be: Sentry.captureException('My important message I want to know about')?

The documentation is not clear on this at all.

Thank you!

1 Like