@@ -64,10 +64,25 @@ def get_internal_network():
64
64
# and thus various UI optimizations should be enabled.
65
65
SENTRY_SINGLE_ORGANIZATION = True
66
66
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.
67
71
SENTRY_OPTIONS ["system.event-retention-days" ] = int (
68
72
env ("SENTRY_EVENT_RETENTION_DAYS" , "90" )
69
73
)
70
74
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
+
71
86
# Self-hosted Sentry infamously has a lot of Docker containers required to make
72
87
# all the features work. Oftentimes, users don't use the full feature set that
73
88
# requires all the containers. This is a way to enable only the error monitoring
0 commit comments