Add version to sentry tracking

This commit is contained in:
Georg Krause 2022-08-14 16:27:55 +02:00
parent 14591adaea
commit b3f31aeea2
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ 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"),
@ -31,6 +32,7 @@ if env("FUNKWHALE_SENTRY_DSN", default=None) is not None:
send_default_pii=False,
environment="api",
debug=env.bool("DEBUG", False),
release=version,
)
sentry_sdk.set_tag("instance", env("FUNKWHALE_HOSTNAME"))