sentry_capture
Captures log events from messages and submits them to Sentry.
Introduced in version 4.16.0.
Fields
dsn
The DSN address to send sentry events to. If left empty, then SENTRY_DSN is used.
Type: string
Default: ""
message
A message to set on the sentry event This field supports interpolation functions.
Type: string
context
A mapping that must evaluate to an object-of-objects or deleted()
. If this mapping produces a value, then it is set on a sentry event as additional context.
Type: string
tags
Sets key/value string tags on an event. Unlike context, these are indexed and searchable on Sentry but have length limitations. This field supports interpolation functions.
Type: object
environment
The environment to be sent with events. If left empty, then SENTRY_ENVIRONMENT is used.
Type: string
Default: ""
release
The version of the code deployed to an environment. If left empty, then the Sentry client will attempt to detect the release from the environment.
Type: string
Default: ""
level
Sets the level on sentry events similar to logging levels.
Type: string
Default: "INFO"
Options:
DEBUG
, INFO
, WARN
, ERROR
, FATAL
.
transport_mode
Determines how events are sent. A sync transport will block when sending each event until a response is received from the Sentry server. The recommended async transport will enqueue events in a buffer and send them in the background.
Type: string
Default: "async"
Options:
async
, sync
.
flush_timeout
The duration to wait when closing the processor to flush any remaining enqueued events.
Type: string
Default: "5s"
sampling_rate
The rate at which events are sent to the server. A value of 0 disables capturing sentry events entirely. A value of 1 results in sending all events to Sentry. Any value in between results sending some percentage of events.
Type: float
Default: 1