@@ -64,10 +64,25 @@ def get_internal_network():
6464# and thus various UI optimizations should be enabled.
6565SENTRY_SINGLE_ORGANIZATION = True
6666
67+ # Sentry event retention days specifies how long events are retained in the database.
68+ # This should be set on your `.env` or `.env.custom` file, instead of modifying
69+ # the value here.
70+ # NOTE: The longer the days, the more disk space is required.
6771SENTRY_OPTIONS ["system.event-retention-days" ] = int (
6872 env ("SENTRY_EVENT_RETENTION_DAYS" , "90" )
6973)
7074
75+ # The secret key is being used for various cryptographic operations, such as
76+ # generating a CSRF token, session token, and registering Relay instances.
77+ # The secret key value should be set on your `.env` or `.env.custom` file
78+ # instead of modifying the value here.
79+ #
80+ # If the key ever becomes compromised, it's important to generate a new key.
81+ # Changing this value will result in all current sessions being invalidated.
82+ # A new key can be generated with `$ sentry config generate-secret-key`
83+ if env ("SENTRY_SYSTEM_SECRET_KEY" ):
84+ SENTRY_OPTIONS ["system.secret-key" ] = env ("SENTRY_SYSTEM_SECRET_KEY" , "" )
85+
7186# Self-hosted Sentry infamously has a lot of Docker containers required to make
7287# all the features work. Oftentimes, users don't use the full feature set that
7388# requires all the containers. This is a way to enable only the error monitoring
0 commit comments