Skip to content
Snippets Groups Projects
Verified Commit 4560042f authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Reformat

parent e1ccbedd
No related branches found
No related tags found
1 merge request!745Resolve "Integrate Sentry for performance and error tracing"
Pipeline #38115 passed
......@@ -858,9 +858,10 @@ SASS_PROCESSOR_STORAGE = DEFAULT_FILE_STORAGE
SENTRY_ENABLED = _settings.get("health.sentry.enabled", False)
if SENTRY_ENABLED:
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.redis import RedisIntegration
from sentry_sdk.integrations.celery import CeleryIntegration
from aleksis.core import __version__
SENTRY_SETTINGS = {
......@@ -877,7 +878,7 @@ if SENTRY_ENABLED:
RedisIntegration(),
CeleryIntegration(),
],
**SENTRY_SETTINGS
**SENTRY_SETTINGS,
)
YARN_INSTALLED_APPS += [
......
......@@ -219,12 +219,14 @@ def custom_information_processor(request: HttpRequest) -> dict:
context["SENTRY_SETTINGS"] = settings.SENTRY_SETTINGS
import sentry_sdk
span = sentry_sdk.Hub.current.scope.span
if span is not None:
context["SENTRY_TRACE_ID"] = span.to_traceparent()
return context
def now_tomorrow() -> datetime:
"""Return current time tomorrow."""
return timezone.now() + timedelta(days=1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment