Surgex.Sentry (Surgex v5.0.0) View Source

Extensions to the official Sentry package.

NOTE: Deprecated in favor of Elixir 1.9 runtime configuration.

Link to this section Summary

Functions

Patches Sentry environment name and release version from env vars.

Deeply scrubs params, obfuscating those with blacklisted names.

Link to this section 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,
  sentry_patch_enabled: 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