Skip to content

Sentry captureException return wrong/not matched event_id with what logged on server #1940

@KhaledLela

Description

@KhaledLela

Package + Version

  • @sentry/browser": "^4.6.4"
  • @sentry/core": "4.6.4"
  • @sentry/types": "4.5.3"
  • @sentry/utils": "4.6.4"

Version:

4.6.4

Description

  • We was using Raven.js client and it was working, But when we decided to upgrade to new Sentry official SDK for angular2 @sentry/browser, We noticed strange behavior after Sentry log error by captureException return event_id & Sentry.lastEventId() neither matched nor exists with event_id that logged on Sentry 9.0.0, This happened when pass error to captureException, But i works with captureException and when pass new Error(msg), What i expect is when captureMessage error with stackTrace make Sentry client behave wrong when generate event_id.
- After Sentry captureException 
Sentry.init({
    dsn: 'our_dsn',
    whitelistUrls: [some_pattern],
});

handleError(error) {
    const event_id = Sentry.captureException(error);  // wrong/not matched event_id
    console.log(event_id); // 2a4f76154e1446f8baa4cf5e38ed2d7f
    console.log(Sentry.lastEventId()); // 2a4f76154e1446f8baa4cf5e38ed2d7f
 // But expected & what is logged in server is `96474888a8154c409c0dcbea29d792ad`

 // Raven.captureException(error);   // Np correct & matched event_id
 // Sentry.captureException(new Error(error.stack));   // Np correct & matched event_id, but missing frames, extra info on server..
 // Sentry.captureMessage(error.message);   // Np correct & matched event_id
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions