Skip to content

Scope passed on captureException is not consistent on sentry dashboard #4406

Closed as not planned
@paschalidi

Description

@paschalidi

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other: @sentry/nextjs

Version:

^6.13.3

Description

I am capturing some errors and I try to add the scope like so:

function captureError({ severity = Severity.Error, error, failScope, extras }: CaptureErrorArgs) {
  withScope(function (scope) {
    scope.setTag('fail-scope', failScope);
    scope.setLevel(severity);
    extras && scope.setExtras(extras);
    captureException(error);
  });
}

Problem is that the errors on sentry dashboard have the scope sometimes and sometimes they dont.

I have tried all the different ways to pass the scope in the capture exception but none seems to work. Any help?

Metadata

Metadata

Assignees

Labels

Package: nextjsIssues related to the Sentry Nextjs SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions