Skip to content

Commit bdb2de7

Browse files
chore(sdk): Enable query source logging (#60649)
Dogfooding the query source feature. Conservatively sets the threshold to 500ms for now. If you're wondering about performance overhead for this, check out info in getsentry/sentry-python#2521 --------- Co-authored-by: Anton Pirker <[email protected]>
1 parent 7479817 commit bdb2de7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/sentry/conf/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,6 +3015,8 @@ def build_cdc_postgres_init_db_volume(settings: Any) -> dict[str, dict[str, str]
30153015
"debug": True,
30163016
"send_default_pii": True,
30173017
"auto_enabling_integrations": False,
3018+
"enable_db_query_source": True,
3019+
"db_query_source_threshold_ms": 500,
30183020
}
30193021

30203022
SENTRY_DEV_DSN = os.environ.get("SENTRY_DEV_DSN")

src/sentry/conf/types/sdk_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class SdkConfig(TypedDict):
1818
before_send_transaction: NotRequired[Callable[[dict[str, Any], object], dict[str, Any]]]
1919
profiles_sample_rate: NotRequired[float]
2020
profiler_mode: NotRequired[Literal["sleep", "thread", "gevent", "unknown"]]
21+
enable_db_query_source: NotRequired[bool]
22+
db_query_source_threshold_ms: NotRequired[int]
2123
_experiments: NotRequired[Any] # TODO
2224

2325

0 commit comments

Comments
 (0)