11defmodule Sentry.Options do
22 @ moduledoc false
33
4- @ common_opts_schema_as_keyword [
4+ @ send_event_opts_schema_as_keyword [
55 result: [
66 type: { :in , [ :sync , :none ] } ,
77 doc: """
@@ -30,6 +30,22 @@ defmodule Sentry.Options do
3030 this call. See the module documentation. *Available since v10.0.0*.
3131 """
3232 ] ,
33+ before_send: [
34+ type: { :or , [ { :fun , 1 } , { :tuple , [ :atom , :atom ] } ] } ,
35+ type_doc: "`t:before_send_event_callback/0`" ,
36+ doc: """
37+ Same as the global `:before_send` configuration, but
38+ applied only to this call. See the module documentation. *Available since v10.0.0*.
39+ """
40+ ] ,
41+ after_send_event: [
42+ type: { :or , [ { :fun , 2 } , { :tuple , [ :atom , :atom ] } ] } ,
43+ type_doc: "`t:after_send_event_callback/0`" ,
44+ doc: """
45+ Same as the global `:after_send_event` configuration, but
46+ applied only to this call. See the module documentation. *Available since v10.0.0*.
47+ """
48+ ] ,
3349
3450 # Private options, only used in testing.
3551 request_retries: [
@@ -38,25 +54,6 @@ defmodule Sentry.Options do
3854 ]
3955 ]
4056
41- @ send_event_opts_schema_as_keyword Keyword . merge ( @ common_opts_schema_as_keyword ,
42- before_send: [
43- type: { :or , [ { :fun , 1 } , { :tuple , [ :atom , :atom ] } ] } ,
44- type_doc: "`t:before_send_event_callback/0`" ,
45- doc: """
46- Same as the global `:before_send` configuration, but
47- applied only to this call. See the module documentation. *Available since v10.0.0*.
48- """
49- ] ,
50- after_send_event: [
51- type: { :or , [ { :fun , 2 } , { :tuple , [ :atom , :atom ] } ] } ,
52- type_doc: "`t:after_send_event_callback/0`" ,
53- doc: """
54- Same as the global `:after_send_event` configuration, but
55- applied only to this call. See the module documentation. *Available since v10.0.0*.
56- """
57- ]
58- )
59-
6057 @ create_event_opts_schema_as_keyword [
6158 exception: [
6259 type: { :custom , Sentry.Event , :__validate_exception__ , [ :exception ] } ,
@@ -194,8 +191,6 @@ defmodule Sentry.Options do
194191
195192 @ create_event_opts_schema NimbleOptions . new! ( @ create_event_opts_schema_as_keyword )
196193
197- @ send_transaction_opts_schema NimbleOptions . new! ( @ common_opts_schema_as_keyword )
198-
199194 @ spec send_event_schema ( ) :: NimbleOptions . t ( )
200195 def send_event_schema do
201196 @ send_event_opts_schema
@@ -213,7 +208,7 @@ defmodule Sentry.Options do
213208
214209 @ spec send_transaction_schema ( ) :: NimbleOptions . t ( )
215210 def send_transaction_schema do
216- @ send_transaction_opts_schema
211+ @ send_event_opts_schema
217212 end
218213
219214 @ spec docs_for ( atom ( ) ) :: String . t ( )
0 commit comments