File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,14 @@ defmodule Sentry do
129129 `MyModule` could look like this:
130130
131131 defmodule MyModule do
132+ @spec before_send(Sentry.Event.t()) :: Sentry.Event.t()
132133 def before_send(event) do
133134 metadata = Map.new(Logger.metadata())
134135 %Sentry.Event{event | extra: Map.merge(event.extra, metadata)}
135136 end
136137
137- def after_send_event(event, result) do
138+ @spec after_send(Sentry.Event.t(), {:ok, String.t()} | {:error, any()}) :: any()
139+ def after_send(event, result) do
138140 case result do
139141 {:ok, id} ->
140142 Logger.info("Successfully sent event!")
@@ -145,6 +147,8 @@ defmodule Sentry do
145147 end
146148 end
147149
150+ If the `before_send` callback returns `nil` or `false`, the event is not reported.
151+
148152 ## Reporting Source Code
149153
150154 Sentry supports reporting the source code of (and around) the line that
You can’t perform that action at this time.
0 commit comments