Skip to content

fix(v7): Only add main process context lines to renderer frames in the app directory - #1475

Merged
timfish merged 1 commit into
v7from
ccr-6ee1cfbd-3n8uz3-v7
Oct 19, 2026
Merged

timfish merged 1 commit into
v7from
ccr-6ee1cfbd-3n8uz3-v7

Conversation

@timfish

@timfish timfish commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Backport of #1469 to v7.

Renderer stack frames mostly hold renderer URLs, which the main process ContextLines integration cannot resolve. Preload script frames are the exception: they are files in the app directory, and the main process adds context lines to them.

This marks events from renderers in sdkProcessingMetadata and wraps the ContextLines integration. For renderer events, it only adds context lines to frames whose file is inside app.getAppPath(). Main process and utility process events are not changed. The wrapper also applies when users add contextLinesIntegration themselves.

The marker uses sdkProcessingMetadata, so it is not sent to Sentry.

…p directory

Renderer stack frames mostly hold renderer URLs. Preload script frames
are files in the app directory and keep their main process context
lines. Renderer frames outside the app directory get none.

This comment was marked as outdated.

This comment was marked as outdated.

@timfish
timfish requested review from JPeer264 and mydea October 15, 2026 14:19
Comment thread test/unit/renderer-event.test.ts Outdated

const result = await wrapped.processEvent?.(event, {}, {} as never);

expect(wrapped).not.toBe(integration);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That line is new, is that expected?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, spot. Not meant to be here!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, just wanted to post a meme - but the comment is gone :P

@timfish
timfish force-pushed the ccr-6ee1cfbd-3n8uz3-v7 branch from b66fc10 to 3950467 Compare October 19, 2026 16:33
@timfish
timfish merged commit faf4ce9 into v7 Oct 19, 2026
309 of 312 checks passed
@timfish
timfish deleted the ccr-6ee1cfbd-3n8uz3-v7 branch October 19, 2026 16:52
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.

2 participants