Skip to content

Commit b0fd8c8

Browse files
committed
chore(sentry_sdk): Include full stack for captured errors
This makes use of the Sentry SDK option added here: getsentry/sentry-python#3673
1 parent 593f280 commit b0fd8c8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/sentry/conf/types/sdk_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SdkConfig(TypedDict):
1616
auto_enabling_integrations: bool
1717
keep_alive: NotRequired[bool]
1818
spotlight: NotRequired[str | bool | None]
19-
19+
add_full_stack: NotRequired[bool]
2020
send_client_reports: NotRequired[bool]
2121
traces_sampler: NotRequired[Callable[[dict[str, Any]], float]]
2222
before_send: NotRequired[Callable[[Event, Hint], Event | None]]

src/sentry/options/defaults.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2356,6 +2356,13 @@
23562356

23572357
# END: SDK Crash Detection
23582358

2359+
# Whether to add the full stack trace to Python errors.
2360+
register(
2361+
"sentry_sdk.add_full_stack",
2362+
default=False,
2363+
flags=FLAG_AUTOMATOR_MODIFIABLE,
2364+
)
2365+
23592366
register(
23602367
# Lists the shared resource ids we want to account usage for.
23612368
"shared_resources_accounting_enabled",

src/sentry/utils/sdk.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ def _get_sdk_options() -> tuple[SdkConfig, Dsns]:
296296
before_send_log=before_send_log,
297297
enable_logs=True,
298298
)
299+
sdk_options["add_full_stack"] = options.get("sentry_sdk.add_full_stack", False)
299300

300301
# Modify SENTRY_SDK_CONFIG in your deployment scripts to specify your desired DSN
301302
dsns = Dsns(

0 commit comments

Comments
 (0)