Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

shouldSendCallback() not working #2253

Copy link
Copy link
@jaimefps

Description

@jaimefps
Issue body actions

Package + Version

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

Version:

^5.6.2

Description

I'm trying to leverage shouldSendCallback and dataCallback, but nothing get's logged when I forcefully throw errors. However, beforeSend does log the event when the forced errors occur.

So I am confused why beforeSend method works with console.log(), but the other two do not.

I've been using Sentry for a few months and everything has worked fine, it is only now with the two methods mentioned above that I cannot seem to get them to log anything for me to confirm they are working.

My config:


{
  dsn: '<my_dsn>',
  release: process.env.RELEASE,
  environment: process.env.NODE_ENV

  // not working
  shouldSendCallback(data) {
    console.log('data1:', data);
    return true;
  },

  // not working
  dataCallback(data) {
    console.log('data2:', data);
    return data;
  },

  // working fine
  beforeSend(event) {
    console.log('event:', event)
    return event;
  },

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.