|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
|
|
|
import copy
|
|
|
import logging
|
|
|
+import os
|
|
|
import sys
|
|
|
from collections.abc import Generator, Mapping, Sequence
|
|
|
from types import FrameType
|
|
@@ -452,6 +453,8 @@ def configure_sdk():
|
|
|
should_summarize_metric=minimetrics.should_summarize_metric,
|
|
|
)
|
|
|
|
|
|
+ enable_cache_spans = os.getenv("SENTRY_URL_PREFIX") == "sentry.my.sentry.io"
|
|
|
+
|
|
|
sentry_sdk.init(
|
|
|
# set back the sentry4sentry_dsn popped above since we need a default dsn on the client
|
|
|
# for dynamic sampling context public_key population
|
|
@@ -459,7 +462,7 @@ def configure_sdk():
|
|
|
transport=MultiplexingTransport(),
|
|
|
integrations=[
|
|
|
DjangoAtomicIntegration(),
|
|
|
- DjangoIntegration(signals_spans=False),
|
|
|
+ DjangoIntegration(signals_spans=False, cache_spans=enable_cache_spans),
|
|
|
CeleryIntegration(monitor_beat_tasks=True, exclude_beat_tasks=exclude_beat_tasks),
|
|
|
# This makes it so all levels of logging are recorded as breadcrumbs,
|
|
|
# but none are captured as events (that's handled by the `internal`
|