You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config.rst
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,10 @@ Optional settings
89
89
90
90
This option allows performing arbitrary operations after attempting to send an event. Accepts an anonymous function or a {module, function} tuple, and the event will be passed as the first argument, and the result of sending the event will be passed as the second argument.
91
91
92
+
.. describe:: sample_rate
93
+
94
+
The sampling factor to apply to events. A value of 0.0 will deny sending any events, and a value of 1.0 will send 100% of events.
95
+
92
96
.. describe:: context_lines
93
97
94
98
The number of lines of source code before and after the line that caused the exception to be included. Defaults to ``3``.
Copy file name to clipboardExpand all lines: lib/sentry/client.ex
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ defmodule Sentry.Client do
41
41
@typeget_dsn::{String.t,String.t,Integer.t}
42
42
@sentry_version5
43
43
@max_attempts4
44
+
@default_sample_rate1.0
44
45
@hackney_pool_name:sentry_pool
45
46
46
47
quotedo
@@ -54,12 +55,23 @@ defmodule Sentry.Client do
54
55
55
56
### Options
56
57
* `:result` - Allows specifying how the result should be returned. Options include `:sync`, `:none`, and `:async`. `:sync` will make the API call synchronously, and return `{:ok, event_id}` if successful. `:none` sends the event from an unlinked child process under `Sentry.TaskSupervisor` and will return `{:ok, ""}` regardless of the result. `:async` will start an unlinked task and return a tuple of `{:ok, Task.t}` on success where the Task can be awaited upon to receive the result asynchronously. When used in an OTP behaviour like GenServer, the task will send a message that needs to be matched with `GenServer.handle_info/2`. See `Task.Supervisor.async_nolink/2` for more information. `:async` is the default.
58
+
* `:sample_rate` - The sampling factor to apply to events. A value of 0.0 will deny sending any events, and a value of 1.0 will send 100% of events.
0 commit comments