Skip to content

Improve Event callback docs #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2025

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
@@ -124,16 +124,18 @@ defmodule Sentry do

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