Exception replay: local variables on the throwing frame
When an error is captured, the variables of the innermost in-app frames can travel with it and show under their frame on the issue page ("Local variables"). Three switches keep this safe:
Opt in per project. Turn on "Keep local variables SDKs attach to errors" in the project's issue settings (
PATCH /v1/projects/{prj}/issue-settingswith{"exception_replay": true}). While it is off, the worker drops the locals before anything is stored.Opt in per SDK. Nothing is read from a frame unless you ask.
Masking. Variable names that look secret (password, token, key, auth, cookie, session, card, ssn, ...) are replaced by
[Filtered]in the SDK, and again on the server together with the project's redaction patterns andsafe_fields. Values are cut to 120 to 256 characters, at most 20 variables per frame and 8 frames per event.
Source | How |
|---|---|
Python SDK |
|
Node SDK |
|
Sentry SDKs | Their |
Stored under contexts.exception_replay.frames[] as {function, filename, lineno, vars}.