Skip to content

shouldSendCallback() not working #2253

Description

@jaimefps

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;
  },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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