This commit is contained in:
parent
bbbe390238
commit
8e12688597
4 changed files with 37 additions and 0 deletions
|
@ -10,9 +10,12 @@ Servala is run using environment variables. Documentation:
|
|||
"""
|
||||
|
||||
import os
|
||||
import sentry_sdk
|
||||
from pathlib import Path
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
|
||||
from django.contrib import messages
|
||||
from servala.__about__ import __version__ as version
|
||||
|
||||
SERVALA_ENVIRONMENT = os.environ.get("SERVALA_ENVIRONMENT", "development")
|
||||
DEBUG = SERVALA_ENVIRONMENT == "development"
|
||||
|
@ -254,3 +257,13 @@ TIME_ZONE = "UTC"
|
|||
|
||||
if SERVALA_ENVIRONMENT in ("staging", "production"):
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
|
||||
SERVALA_SENTRY_DSN = os.environ.get("SERVALA_SENTRY_DSN")
|
||||
sentry_sdk.init(
|
||||
dsn=SERVALA_SENTRY_DSN,
|
||||
integrations=[DjangoIntegration()],
|
||||
auto_session_tracking=False,
|
||||
traces_sample_rate=0.01,
|
||||
release=version,
|
||||
environment=SERVALA_ENVIRONMENT,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue