kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Backport sentry
rodzic
a0e734c386
commit
e736d1b932
|
@ -17,6 +17,25 @@ APPS_DIR = ROOT_DIR.path("funkwhale_api")
|
|||
env = environ.Env()
|
||||
ENV = env
|
||||
LOGLEVEL = env("LOGLEVEL", default="info").upper()
|
||||
|
||||
|
||||
if env("FUNKWHALE_SENTRY_DSN", default=None) is not None:
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
from sentry_sdk.integrations.celery import CeleryIntegration
|
||||
from funkwhale_api import __version__ as version
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn=env("FUNKWHALE_SENTRY_DSN"),
|
||||
integrations=[DjangoIntegration(), CeleryIntegration()],
|
||||
traces_sample_rate=env("FUNKWHALE_SENTRY_SR", default=0.25),
|
||||
send_default_pii=False,
|
||||
environment="api",
|
||||
debug=env.bool("DEBUG", False),
|
||||
release=version,
|
||||
)
|
||||
sentry_sdk.set_tag("instance", env("FUNKWHALE_HOSTNAME"))
|
||||
|
||||
"""
|
||||
Default logging level for the Funkwhale processes""" # pylint: disable=W0105
|
||||
|
||||
|
|
|
@ -69,3 +69,4 @@ watchdog~=2.1.2
|
|||
|
||||
## Pin third party dependency to avoid issue with latest version
|
||||
asgiref==3.3.4 #1516
|
||||
sentry-sdk==1.9.5
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Add Sentry SDK to collect errors at the backend
|
|
@ -197,3 +197,7 @@ AWS_STORAGE_BUCKET_NAME=
|
|||
# Available options can be found here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl
|
||||
|
||||
# AWS_DEFAULT_ACL=
|
||||
|
||||
# Funkwhale allows collecting errors using Sentry compatible APIs. If you want
|
||||
# to help us improving Funkwhale, feel free to use our instance:
|
||||
#FUNKWHALE_SENTRY_DSN=https://5840197379c64f65aad3c5c09274994d@am.funkwhale.audio/1
|
||||
|
|
Ładowanie…
Reference in New Issue