Surgex v1.1.0 Surgex.Sentry
Extensions to the official Sentry package.
Summary
Functions
Patches Sentry environment name and release version from env vars
Deeply scrubs params, obfuscating those with blacklisted names
Functions
Patches Sentry environment name and release version from env vars.
By default, Sentry package only allows to fetch DSN from env var. This function extends that with environment name and release version set on runtime, thus enabling deployments on Heroku where application slug is compiled without final env vars.
Examples
In order to execute this extension on application start, set an appropriate config key:
config :surgex,
enable_sentry_patch: true
Deeply scrubs params, obfuscating those with blacklisted names.
By default, Sentry package only offers flat scrubbing of params. This won’t work with nested params or JSON objects, so here’s deep recursive equivalent of such scrubber.
Examples
In order to use this extension, pass Surgex.Sentry.scrub_params/1
to Sentry.Plug
like this:
use Sentry.Plug, body_scrubber: &Surgex.Sentry.scrub_params/1