Skip to content

Commit

Permalink
Use sentry property in rest of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Feb 12, 2024
1 parent 174b5ca commit d60ae66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class PinoSentryTransport {
const message: any & Error = get(chunk, this.messageAttributeKey);
const stack = get(chunk, this.stackAttributeKey) || '';

const scope = new Sentry.Scope();
const scope = new this.sentry.Scope();
this.decorateScope(chunk, scope);

scope.setLevel(severity as any);
Expand All @@ -168,11 +168,11 @@ export class PinoSentryTransport {
if (this.isSentryException(severity)) {
const error = message instanceof Error ? message : new ExtendedError({ message, stack });

Sentry.captureException(error, scope);
this.sentry.captureException(error, scope);
setImmediate(cb);
} else {
// Capturing Messages
Sentry.captureMessage(message, scope);
this.sentry.captureMessage(message, scope);
setImmediate(cb);
}
}
Expand Down

0 comments on commit d60ae66

Please sign in to comment.