Skip to content

Commit

Permalink
tec: Allow administrators to send PII to Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
marien-probesys committed Jan 14, 2025
1 parent cd0d53e commit 5141ff7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ MAILER_FROM=support@example.com

MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0

SENTRY_SEND_DEFAULT_PII=false

LDAP_ENABLED=false
LDAP_HOST="ldap"
LDAP_PORT=1389
Expand Down
1 change: 1 addition & 0 deletions config/packages/sentry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ when@prod:
register_error_handler: false
options:
release: '%app.version%'
send_default_pii: '%env(bool:SENTRY_SEND_DEFAULT_PII)%'
7 changes: 7 additions & 0 deletions docs/administrators/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ www-data$ php bin/console app:ldap:sync
You can configure Bileto to send errors (exceptions and logs) to a Sentry server.
All you need to do is set the `SENTRY_DSN` environment variable to the value that Sentry gives you when you create a new project.

You can also set `SENTRY_SEND_DEFAULT_PII` to `true` to send personally identifiable information (PII) to Sentry (e.g. IP, logged-in user's email, etc.).

> [!CAUTION]
> Sending PII to Sentry is subject to GDPR.
> Don't enable this option unless you're sure you're compliant.
> More information about collected data in [the Sentry documentation](https://docs.sentry.io/platforms/php/guides/symfony/data-management/data-collected/).
## Updating the production environment

**Please always start by checking the migration notes in [the changelog](/CHANGELOG.md) before updating Bileto.**
Expand Down
6 changes: 6 additions & 0 deletions env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# Uncomment and set with the DSN provided by your Sentry project.
# SENTRY_DSN="https://5fe4d21cda80b563b4557707c12eb30@sentry.example.com/42"

# Uncomment to send personally identifiable information (PPI) to Sentry.
# This data is subject to GDPR, so don't enable this option unless you're
# sure you're compliant.
# More info about collected data: https://docs.sentry.io/platforms/php/guides/symfony/data-management/data-collected/
# SENTRY_SEND_DEFAULT_PII=true

#########################
# Configuration of LDAP #
#########################
Expand Down

0 comments on commit 5141ff7

Please sign in to comment.