Skip to content

Conversation

@brain-geek
Copy link
Contributor

@brain-geek brain-geek commented Jul 9, 2025

Changing a few things there:

  • typo in function name (after_send is not a function)
  • Adding a note about how to stop Sentry from reporting event. Filtering Exceptions section says:

If you would like to prevent Sentry from sending certain exceptions, you can use the :before_send configuration option. See the Event Callbacks section below.

But in the Event Callbacks section it does not say a word on how to filter those.

  • Adding a type spec for a bit easier investigation into how to test it. I had to look into the code of this actual repo to understand this and previous point. Now it should be a bit more obvious.

#skip-changelog

lib/sentry.ex Outdated
config :sentry,
before_send: {MyModule, :before_send},
after_send_event: {MyModule, :after_send}
after_send_event: {MyModule, :after_send_event}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead change the function name in the code example to be :after_send?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whatyouhide sure, changed that.

@whatyouhide whatyouhide merged commit b7e1679 into getsentry:master Jul 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants