Skip to content

Commit

Permalink
chore(sdk): Enable query source logging (#60649)
Browse files Browse the repository at this point in the history
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 <anton.pirker@sentry.io>
  • Loading branch information
gggritso and antonpirker authored Nov 29, 2023
1 parent 7479817 commit bdb2de7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3015,6 +3015,8 @@ def build_cdc_postgres_init_db_volume(settings: Any) -> dict[str, dict[str, str]
"debug": True,
"send_default_pii": True,
"auto_enabling_integrations": False,
"enable_db_query_source": True,
"db_query_source_threshold_ms": 500,
}

SENTRY_DEV_DSN = os.environ.get("SENTRY_DEV_DSN")
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/conf/types/sdk_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class SdkConfig(TypedDict):
before_send_transaction: NotRequired[Callable[[dict[str, Any], object], dict[str, Any]]]
profiles_sample_rate: NotRequired[float]
profiler_mode: NotRequired[Literal["sleep", "thread", "gevent", "unknown"]]
enable_db_query_source: NotRequired[bool]
db_query_source_threshold_ms: NotRequired[int]
_experiments: NotRequired[Any] # TODO


Expand Down

0 comments on commit bdb2de7

Please sign in to comment.