Skip to content

Commit cb04518

Browse files
Merge pull request #367 from pinksynth/send-event-docs
Docs - clarify opts for Sentry.Client.send_event/2
2 parents 8b7bf36 + a30ec6b commit cb04518

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/sentry/client.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ defmodule Sentry.Client do
6060
### Options
6161
* `: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.
6262
* `: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.
63+
* Other options, such as `:stacktrace` or `:extra` will be passed to `Sentry.Event.create_event/1` downstream. See `Sentry.Event.create_event/1` for available options.
6364
"""
6465
@spec send_event(Event.t()) :: send_event_result
6566
def send_event(%Event{} = event, opts \\ []) do

0 commit comments

Comments
 (0)