Feat: add crash reporting to Sentry#219
Merged
Merged
Conversation
Contributor
Author
|
Commit ef949d9 is not ideal as it is adding more context to the |
hisenb3rg
commented
Jun 12, 2026
NejcS
approved these changes
Jun 12, 2026
NejcS
left a comment
Contributor
There was a problem hiding this comment.
Left one minor comment. Definitely not a blocker for merging.
Add current module, FRID, state-machine state onto RunState as rendering progresses, so a crash handler can use it and report where the renderer was. fixup: add module to runstate
3f2aa36 to
de3c2cf
Compare
Introduce plain2code_telemetry.py, which reports only unexpected exceptions to Sentry — expected user-facing errors (now collected in EXPECTED_EXCEPTIONS in plain2code.py) are never sent. Privacy and safety measures: - Disabled via CODEPLAIN_NO_TELEMETRY=1; user is informed in the exit summary whenever a crash report was sent - Local variables likely to hold spec or generated code are scrubbed from stack traces; no PII or hostname sent, only render context tags - Telemetry failures are swallowed so they never break the CLI or mask the original crash
The 'headers' local in codeplain_REST_api.post_request holds the raw API key (X-API-Key) and was serialized into stack trace frame vars. Add 'headers' and the hyphenated 'x-api-key' to the scrub denylist (the SDK default only covers the underscore form) and enable recursive scrubbing so sensitive keys nested inside dict locals are filtered too. Users remain identifiable via the existing render_id tag, which the backend can map to an account since every render API call sends the render_id on an authenticated request.
de3c2cf to
c80d18c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce plain2code_telemetry.py, which reports only unexpected exceptions to Sentry — expected user-facing errors (now collected in EXPECTED_EXCEPTIONS in plain2code.py) are never sent. Sentry DSN is not secret and safe to share in the code.
Privacy and safety measures: