sentry v4.0.3 Sentry.Client
This module is the default client for sending an event to Sentry via HTTP.
It makes use of Task.Supervisor
to create unlinked asynchronous tasks
to avoid holding up a user’s application to send a Sentry event.
Configuration
:before_send_event
- allows performing operations on the event before it is sent. Accepts an anonymous function or a {module, function} tuple, and the event will be passed as the only argument.
Example configuration of putting Logger metadata in the extra context:
config :sentry,
before_send_event: fn(event) ->
metadata = Map.new(Logger.metadata)
%{event | extra: Map.merge(event.extra, metadata)}
end
Summary
Functions
Generates a Sentry API authorization header
Get a Sentry DSN which is simply a URI
Makes the HTTP request to Sentry using hackney
Starts an unlinked asynchronous task that will attempt to send the event to the Sentry API up to 4 times with exponential backoff
Types
Functions
Generates a Sentry API authorization header.
Get a Sentry DSN which is simply a URI.
Makes the HTTP request to Sentry using hackney.
Hackney options can be set via the hackney_opts
configuration option.
Starts an unlinked asynchronous task that will attempt to send the event to the Sentry API up to 4 times with exponential backoff.
The event is dropped if it all retries fail.