Skip to content

docs: define redaction and skip_sentry scope for opt-in Sentry Logs - #463

Merged
lesnik512 merged 1 commit into
mainfrom
fix/sentry-logs-contract
Nov 15, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/sentry-logs-contract

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Opt-in Sentry Logs can send raw rendered JSON, including sensitive fields and records marked skip_sentry=True. Document that built-in redaction and suppression cover issue events and breadcrumbs; callers who enable Logs must filter them through sentry_additional_params["before_send_log"].

Validated SDK recognition on sentry-sdk 2.70.0 with structlog 21.3.0 and the installed SDK 2.73.0. The Logs hook receives a plain string body and an empty hint, losing the renderer's provenance marker. Structlog and identical stdlib JSON share the same origin, so automatic recognition would require unreliable heuristics or global logging patches. Runtime behavior stays unchanged.

Add serialized-envelope contract tests for both Logs opt-in mechanisms, callback delivery, unchanged stdout, issue redaction, and identical stdlib JSON. Update the migration guide, configuration docs, and seam ADR.

Validation: 681 tests pass with 100% line coverage; Ruff, ty 0.0.100, and the strict docs build pass. Standards and spec reviews found no issues.

Closes #452.

@lesnik512
lesnik512 merged commit 4cacf6c into main Nov 15, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/sentry-logs-contract branch November 15, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2] Define skip_sentry behavior for opt-in Sentry Logs

1 participant