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 @@ -124,16 +124,18 @@ defmodule Sentry do
124124
125125 config :sentry,
126126 before_send: {MyModule, :before_send},
127- after_send_event: {MyModule, :after_send }
127+ after_send_event: {MyModule, :after_send_event }
128128
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
138+ @spec after_send_event(Sentry.Event.t(), {:ok, String.t()} | {:error, any()}) :: any()
137139 def after_send_event(event, result) do
138140 case result do
139141 {:ok, id} ->
@@ -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