GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Apply stack frame metadata before event processors by lforst · Pull Request #12799 · getsentry/sentry-javascript

Conversation

@lforst

@lforst lforst commented Jul 8, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #12704

Previously we had a bug where stack frame metadata wasn't properly applied when something rewrote the stack frame file names in a way that wouldn't allow us to associate the injected metadata stack traces with the stack frames. This boils down to a timing issue where we would attempt to write the stack frame metadata onto the stack frames after the event processors have run, even though we should do that before they run.

To solve this timing issue, this PR adds a hook applyFrameMetadata to the client that signals the moment frame metadata should be attached. Additionally we update all of the integrations that make use of frame metadata to use this hook.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Luca Forstner
fix: Apply stack frame metadata before event processors
8d320b6
@github-actions

github-actions Bot commented Jul 8, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.29 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing) 33.44 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.19 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.52 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.25 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.88 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.74 KB (+0.02% 🔺)
@sentry/browser (incl. metrics) 26.58 KB (+0.05% 🔺)
@sentry/browser (incl. Feedback) 38.97 KB (+0.04% 🔺)
@sentry/browser (incl. sendFeedback) 26.92 KB (+0.06% 🔺)
@sentry/browser (incl. FeedbackAsync) 31.53 KB (+0.05% 🔺)
@sentry/react 25.04 KB (+0.08% 🔺)
@sentry/react (incl. Tracing) 36.48 KB (+0.05% 🔺)
@sentry/vue 26.4 KB (+0.05% 🔺)
@sentry/vue (incl. Tracing) 35.3 KB (+0.05% 🔺)
@sentry/svelte 22.43 KB (+0.06% 🔺)
CDN Bundle 23.51 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing) 35.21 KB (+0.05% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.31 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.5 KB (+0.04% 🔺)
CDN Bundle - uncompressed 69 KB (+0.05% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 104.02 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.41 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 227.12 KB (+0.02% 🔺)
@sentry/nextjs (client) 36.36 KB (+0.04% 🔺)
@sentry/sveltekit (client) 34.09 KB (+0.05% 🔺)
@sentry/node 130.86 KB (+0.02% 🔺)
@sentry/node - without tracing 91.88 KB (+0.02% 🔺)
@sentry/aws-serverless 117.04 KB (+0.02% 🔺)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Luca Forstner
Add tests
9e66686
@lforst
lforst marked this pull request as ready for review July 9, 2024 09:22
@lforst
lforst requested review from chargome, mydea and timfish July 9, 2024 09:22
timfish
timfish approved these changes Jul 9, 2024
View reviewed changes
Luca Forstner added 2 commits July 9, 2024 09:44
Luca Forstner
fix tests
3718368
Luca Forstner
Fix tests
503cf42
mydea
mydea reviewed Jul 9, 2024
View reviewed changes
Comment thread packages/core/src/integrations/metadata.ts
return event;
client.on('applyFrameMetadata', event => {
// Only apply stack frame metadata to error events
if (event.type !== undefined) {

@mydea mydea Jul 9, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
if (event.type !== undefined) {
if (event.type) {

slightly smaller?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mydea
mydea reviewed Jul 9, 2024
View reviewed changes
Comment thread packages/core/src/integrations/third-party-errors-filter.ts

client.on('applyFrameMetadata', event => {
// Only apply stack frame metadata to error events
if (event.type !== undefined) {

@mydea mydea Jul 9, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
if (event.type !== undefined) {
if (event.type) {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mydea
mydea approved these changes Jul 9, 2024
View reviewed changes
@lforst
lforst merged commit a5ea680 into develop Jul 9, 2024
@lforst
lforst deleted the lforst-fix-order-issue-for-frame-metadata branch July 9, 2024 11:30
This was referenced Jul 30, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.16.0 https-quantumblockchainai-atlassian-net/ossinsight#787
Open
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.17.0 https-quantumblockchainai-atlassian-net/ossinsight#791
Open
@amykapernick amykapernick mentioned this pull request Aug 1, 2024
[Snyk] Upgrade @sentry/nextjs from 8.14.0 to 8.17.0 amykapernick/wedding#12
Open
@wkylin wkylin mentioned this pull request Aug 1, 2024
[Snyk] Upgrade @sentry/react from 8.15.0 to 8.17.0 wkylin/pro-react-admin#370
Closed
@q1blue q1blue mentioned this pull request Aug 6, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.18.0 https-quantumblockchainai-atlassian-net/ossinsight#799
Open
@wkylin wkylin mentioned this pull request Aug 7, 2024
[Snyk] Upgrade @sentry/react from 8.15.0 to 8.18.0 wkylin/pro-react-admin#371
Merged
This was referenced Aug 9, 2024
[Snyk] Upgrade @sentry/react from 7.118.0 to 8.19.0 Stanislav1975/win11React#4
Open
[Snyk] Upgrade @sentry/node from 6.17.4 to 8.19.0 Stanislav1975/shields#596
Open
@q1blue q1blue mentioned this pull request Aug 9, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.19.0 https-quantumblockchainai-atlassian-net/ossinsight#802
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Aug 11, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.19.0 FengShangWuQi/fengshangwuqi.github.io#1914
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@timfish timfish timfish approved these changes
@mydea mydea mydea approved these changes
@chargome chargome Awaiting requested review from chargome

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Parsing Issue with moduleMetadataIntegration in Next.js Micro Frontend Setup Using Sentry

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@lforst @timfish @mydea
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.