Sentry Destination Config Reference
Beta- free
- growth
- enterprise
7 minute read
Sentry is a web device mode error monitoring destination. RudderStack’s JavaScript SDK loads Sentry’s browser SDK, which reports your site’s JavaScript errors to Sentry, and sets the Sentry user from each identify call so errors carry who hit them.
In a Sentry destination spec:
type: sentrydefinition_version: 1
Sample configuration
version: rudder/v1
kind: destination
metadata:
name: sentry-prod
spec:
id: sentry-prod
display_name: Sentry Production
type: sentry
definition_version: 1
enabled: true
config:
dsn: "{{ .SENTRY_DSN }}"
environment: production
custom_version_property: APP_VERSION
release: web-app@2.3.12
server_name: web-frontend
logger: rudderstack
debug_mode: false
ignore_errors:
- ResizeObserver loop limit exceeded
allow_urls:
- https://www.example.com
deny_urls:
- chrome-extension://
include_paths:
- example\.com/assets/
connection_mode:
web: device
consent_management:
web:
- provider: oneTrust
consents:
- analyticsThe above example reports the version in window.APP_VERSION as the release, falling back to web-app@2.3.12 when the page doesn’t define it — see Error context.
Config keys
config accepts only the keys listed below. The shared config key rules cover unknown keys, defaults, and immutability.
Sentry runs only in web device mode, and acts only onidentifycalls, which set the user attached to subsequent errors. Every key on this page configures Sentry’s browser SDK.
Connection
dsn
RequiredSecretType:
string
Description: Public DSN of your Sentry project — the URL Sentry’s browser SDK reports errors to, from the project’s Client Keys (DSN) settings. The dashboard calls it Public DSN.
Notes:
- At most 300 characters, and must not contain line breaks.
- A
{{ path || fallback }}template is accepted in place of a literal.
Supply it as a {{ .VAR }} reference rather than a literal — see Secrets.
Error context
These keys label the errors Sentry reports. None of them is validated locally.
environment
Type:
string
Description:
Environment Sentry files errors under, such as production or staging.
Notes:
- Sentry silently drops an environment that contains a forward slash, a space, or a line break, or that is
None.
custom_version_property
Type:
string
Description:
Name of a global window variable holding your app’s version. When the page defines it, its value is sent as the release, taking precedence over release. The dashboard calls it Set Release By Property.
Notes:
- A top-level variable name, not a dotted path:
APP_VERSIONreadswindow.APP_VERSION.
custom_version_property: APP_VERSION
release: web-app@2.3.12release
Type:
string
Description:
Release, or app version, Sentry attaches to each error, such as web-app@2.3.12.
Notes:
- Used when
custom_version_propertyis unset, or names a variable the page doesn’t define. - Sentry discards session data that has no release, so set
release,custom_version_property, or both.
server_name
Type:
string
Description: Server name Sentry attaches to each error, identifying the host the client runs on.
logger
Type:
string
Description:
Value of the logger tag set on every error Sentry reports.
Error filtering
These keys decide which errors Sentry reports. Each entry is matched as plain text, not as a regular expression: an entry matches any message or URL that contains it.
ignore_errors
Type:
array of strings
Description: Error messages Sentry doesn’t report. An error whose message contains an entry is dropped.
Notes:
- Each entry is at most 100 characters, or a
{{ path || fallback }}template.
allow_urls
Type:
array of strings
Description: Script URLs Sentry reports errors from. When the list is set, only errors raised by a script whose URL contains an entry are reported.
Notes:
- Each entry must not contain line breaks. Any entry containing
.ngrok.iois rejected. - A
{{ path || fallback }}template is accepted in place of a literal.
deny_urls
Type:
array of strings
Description: Script URLs whose errors Sentry doesn’t report — for example, browser extensions or third-party scripts. An error raised by a script whose URL contains an entry is dropped.
Notes:
- Each entry must not contain line breaks. Any entry containing
.ngrok.iois rejected. - A
{{ path || fallback }}template is accepted in place of a literal.
deny_urls:
- chrome-extension://
- cdn.thirdparty.exampleStack traces
include_paths
Type:
array of strings
Description: Regular expressions matching the URLs of your app’s own scripts. A stack frame whose file URL matches an entry is marked as your app’s code, and every other frame as third-party, which Sentry collapses in the stack trace.
Notes:
- An entry that isn’t a valid regular expression is skipped.
- Each entry is at most 100 characters, or a
{{ path || fallback }}template.
include_paths:
- example\.com/assets/Debugging
debug_mode
Type:
boolean
Default value:
false
Description: Turn on the Sentry SDK’s debug mode, which logs the SDK’s diagnostic messages to the browser console. It doesn’t stop errors from being sent to Sentry.
Event filtering
Client-side event filtering applies only totrackevents, and Sentry acts only onidentifycalls, so this block has no effect on what Sentry receives. Rudder CLI accepts it all the same.
event_filtering
Type:
object
Description:
Restricts which track events the SDK passes to Sentry, by event name.
Notes:
whitelist— array of event names to allow; every othertrackevent is dropped.blacklist— array of event names to drop; every othertrackevent is allowed.- The two are mutually exclusive, and Rudder CLI enforces it — setting both fails validation.
- Each name is at most 100 characters, or a
{{ path || fallback }}template.
Per-source keys
Both keys are objects keyed by the local source type — the tokens listed under Source types. A key naming a source type this destination doesn’t support fails validation.
connection_mode
Type:
object
Description:
Maps each source type you connect to the mode its events reach Sentry in. Sentry accepts only web: device.
Notes:
- An entry is required for each source type you connect — see Connect a source.
connection_mode:
web: deviceconsent_management
Type:
object
Description:
Consent provider configuration per source type. The entry shape, accepted providers, and the rules on resolution_strategy and consents are shared across all destination types — see Consent management.
Source types
Sentry accepts events from these source types in the mentioned connection modes:
| Source type | Connection mode |
|---|---|
web | device |
Sentry accepts only web sources, and only in device mode — the SDK loads Sentry’s browser SDK, and no events pass through RudderStack’s servers.
Connect a source
An event stream connection to this destination is checked against two rules at validate time.
The source’s type must be supported. Sentry accepts only web, the type a JavaScript source resolves to. Every other source resolves to a type it doesn’t accept — an iOS source to ios, an Android source to android, and webhook and server-side SDK sources to cloud — and reports, for example:
destination 'sentry-prod' (type 'sentry') does not support source 'my-ios-app':
source type 'ios' is not among supported source types: webThe destination config must carry a connection_mode entry for that source type. This lives on the destination spec, not on the connection spec. Without it:
destination 'sentry-prod' config has no 'connection_mode' entry for source type 'web'Sentry needs no additional config keys to connect a web source.
Secrets
dsn is the only secret key. Write it as a {{ .VAR }} reference and supply the value at apply time:
config:
dsn: "{{ .SENTRY_DSN }}"export RUDDER_SENTRY_DSN="..."
rudder-cli apply
# or
rudder-cli apply --var-file secrets.vars.yamlNote that:
rudder-cli importwrites only the secrets the API returns, as{{ .VAR }}references, and leaves the others out. Add any secret key it leaves out, then supply the variables before you apply — see Secrets.- The DSN is embedded in the page’s JavaScript, so masking it protects your YAML, not the value itself.
See How to Use Variable Substitution in Rudder CLI.
Changes by release
No changes since this type became available.
For changes across every destination type, see Destination Type Changes by Release.
See more
- Sentry Destination for the public DSN, release tracking, and how
identifysets the Sentry user - Destination Type Reference for Rudder CLI for the rules shared across destination types
- Destination YAML Reference for the spec envelope