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 — feat(core): Capture # of dropped spans through `beforeSendTransaction` by mydea · Pull Request #13022 · getsentry/sentry-javascript

Conversation

@mydea

@mydea mydea commented Jul 23, 2024

Copy link
Copy Markdown
Member

Fixes #12849.

This is a bit tricky because beforeSendTransaction can return a promise, so in order to avoid dealing with this I put the # of spans on the sdk metadata, and then compare that afterwards.

Sorry, something went wrong.

Uh oh!

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

All reactions
@mydea
mydea requested review from Lms24, cleptric and s1gr1d July 23, 2024 15:18
@mydea mydea self-assigned this Jul 23, 2024
mydea
mydea commented Jul 23, 2024
View reviewed changes
Comment thread packages/core/src/baseclient.ts
const spans = event.spans || [];
// the transaction itself counts as one span, plus all the child spans that are added
const spanCount = 1 + spans.length;
this._outcomes['span'] = (this._outcomes['span'] || 0) + spanCount;

@mydea mydea Jul 23, 2024

Copy link
Copy Markdown
Member Author

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.

Noticed that this was actually buggy, because the key is built from reason + category 😬 now this is unified and should work consistently.

Sorry, something went wrong.

Uh oh!

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

Lms24 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@github-actions

github-actions Bot commented Jul 23, 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.4 KB (+0.43% 🔺)
@sentry/browser (incl. Tracing) 33.85 KB (+0.37% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.91 KB (+0.14% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.25 KB (+0.15% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 74.31 KB (+0.13% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 86.68 KB (+0.12% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 88.56 KB (+0.14% 🔺)
@sentry/browser (incl. metrics) 26.71 KB (+0.34% 🔺)
@sentry/browser (incl. Feedback) 39.11 KB (+0.23% 🔺)
@sentry/browser (incl. sendFeedback) 27.02 KB (+0.33% 🔺)
@sentry/browser (incl. FeedbackAsync) 31.66 KB (+0.27% 🔺)
@sentry/react 25.17 KB (+0.37% 🔺)
@sentry/react (incl. Tracing) 36.9 KB (+0.27% 🔺)
@sentry/vue 26.55 KB (+0.39% 🔺)
@sentry/vue (incl. Tracing) 35.7 KB (+0.25% 🔺)
@sentry/svelte 22.54 KB (+0.42% 🔺)
CDN Bundle 23.59 KB (+0.32% 🔺)
CDN Bundle (incl. Tracing) 35.58 KB (+0.22% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.95 KB (+0.13% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 75.22 KB (+0.1% 🔺)
CDN Bundle - uncompressed 69.32 KB (+0.47% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 105.42 KB (+0.31% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 217.06 KB (+0.15% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.89 KB (+0.14% 🔺)
@sentry/nextjs (client) 36.75 KB (+0.26% 🔺)
@sentry/sveltekit (client) 34.49 KB (+0.29% 🔺)
@sentry/node 111.86 KB (+0.09% 🔺)
@sentry/node - without tracing 89.3 KB (+0.1% 🔺)
@sentry/aws-serverless 98.44 KB (+0.1% 🔺)
Lms24 reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

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

Lms24
Lms24 approved these changes Jul 23, 2024
View reviewed changes

@Lms24 Lms24 left a comment

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.

l: no particular strong feelings given these are client reports but should we add a test for them?

Sorry, something went wrong.

Uh oh!

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

mydea reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@mydea

mydea commented Jul 24, 2024

Copy link
Copy Markdown
Member Author

l: no particular strong feelings given these are client reports but should we add a test for them?

Yeah I thought about this too, I'll add some I think!

All reactions

Sorry, something went wrong.

Uh oh!

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

@mydea
mydea force-pushed the fn/dropped-spans-beforeSendTransaction branch from c67e225 to aeefa66 Compare July 24, 2024 08:20
mydea added 4 commits July 25, 2024 14:13
@mydea
feat(core): Capture # of dropped spans through beforeSendTransaction
6b7d131
@mydea
small ref
495dbd7
@mydea
add tests
08c0ff7
@mydea
adjust size limits
f6ddc1c
@mydea
mydea force-pushed the fn/dropped-spans-beforeSendTransaction branch from 15d9059 to f6ddc1c Compare July 25, 2024 12:13
@mydea
mydea merged commit df45d65 into develop Jul 29, 2024
@mydea
mydea deleted the fn/dropped-spans-beforeSendTransaction branch July 29, 2024 07:00
@mydea mydea mentioned this pull request Jul 30, 2024
Record spans dropped through event processors #13104
Closed
krystofwoldrich pushed a commit that referenced this pull request Aug 13, 2024
@mydea Krystof Woldrich
feat(core): Capture # of dropped spans through beforeSendTransaction (
305f4f4
#13022)

Fixes #12849.

This is a bit tricky because `beforeSendTransaction` can return a
promise, so in order to avoid dealing with this I put the # of spans on
the sdk metadata, and then compare that afterwards.
@sleidig sleidig mentioned this pull request Aug 21, 2024
[Snyk] Upgrade @sentry/angular from 8.20.0 to 8.21.0 Aam-Digital/ndb-core#2517
Closed
@q1blue q1blue mentioned this pull request Aug 22, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.21.0 https-quantumblockchainai-atlassian-net/ossinsight#814
Open
@sleidig sleidig mentioned this pull request Aug 22, 2024
[Snyk] Upgrade @sentry/angular from 8.20.0 to 8.22.0 Aam-Digital/ndb-core#2519
Closed
@angeloreale angeloreale mentioned this pull request Aug 22, 2024
[Snyk] Upgrade @sentry/nextjs from 8.20.0 to 8.22.0 dupipcom/hypnos#32
Merged
@q1blue q1blue mentioned this pull request Aug 23, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.22.0 https-quantumblockchainai-atlassian-net/ossinsight#816
Open
@gokulk16 gokulk16 mentioned this pull request Aug 23, 2024
[Snyk] Upgrade @sentry/browser from 8.20.0 to 8.22.0 gokulk16/type-to-calculate-web#33
Closed
@FengShangWuQi FengShangWuQi mentioned this pull request Aug 25, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.22.0 FengShangWuQi/fengshangwuqi.github.io#1916
Closed
@angeloreale angeloreale mentioned this pull request Aug 25, 2024
[Snyk] Upgrade @sentry/nextjs from 8.20.0 to 8.22.0 dupipcom/hypnos#46
Closed
@q1blue q1blue mentioned this pull request Aug 27, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.23.0 https-quantumblockchainai-atlassian-net/ossinsight#820
Open
@gokulk16 gokulk16 mentioned this pull request Aug 27, 2024
[Snyk] Upgrade @sentry/browser from 8.20.0 to 8.23.0 gokulk16/type-to-calculate-web#35
Closed
@angeloreale angeloreale mentioned this pull request Aug 27, 2024
[Snyk] Upgrade @sentry/nextjs from 8.20.0 to 8.23.0 dupipcom/hygieia#1
Merged
@tomwwinter tomwwinter mentioned this pull request Aug 27, 2024
[Snyk] Upgrade @sentry/angular from 8.20.0 to 8.23.0 Aam-Digital/ndb-core#2537
Closed
@gokulk16 gokulk16 mentioned this pull request Aug 28, 2024
[Snyk] Upgrade @sentry/browser from 8.20.0 to 8.24.0 gokulk16/type-to-calculate-web#36
Closed
@angeloreale angeloreale mentioned this pull request Aug 28, 2024
[Snyk] Upgrade @sentry/nextjs from 8.20.0 to 8.24.0 dupipcom/hygieia#3
Open
@q1blue q1blue mentioned this pull request Aug 28, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.24.0 https-quantumblockchainai-atlassian-net/ossinsight#833
Open
@angeloreale angeloreale mentioned this pull request Aug 29, 2024
[Snyk] Upgrade @sentry/nextjs from 8.20.0 to 8.24.0 dupipcom/hygieia#4
Open
@gokulk16 gokulk16 mentioned this pull request Aug 30, 2024
[Snyk] Upgrade @sentry/browser from 8.20.0 to 8.25.0 gokulk16/type-to-calculate-web#38
Merged
@angeloreale angeloreale mentioned this pull request Aug 30, 2024
[Snyk] Upgrade @sentry/nextjs from 8.20.0 to 8.25.0 dupipcom/hygieia#5
Open
@q1blue q1blue mentioned this pull request Aug 30, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.25.0 https-quantumblockchainai-atlassian-net/ossinsight#835
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Sep 1, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.25.0 FengShangWuQi/fengshangwuqi.github.io#1918
Closed
@PierreGode PierreGode mentioned this pull request Sep 4, 2024
[Snyk] Upgrade @sentry/node from 8.9.2 to 8.25.0 PierreGode/shields#1
Closed
@q1blue q1blue mentioned this pull request Sep 7, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.26.0 https-quantumblockchainai-atlassian-net/ossinsight#846
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Sep 8, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.26.0 FengShangWuQi/fengshangwuqi.github.io#1919
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Lms24 Lms24 Lms24 approved these changes
@cleptric cleptric Awaiting requested review from cleptric
@s1gr1d s1gr1d Awaiting requested review from s1gr1d

Uh oh!

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

Assignees

@mydea mydea

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Record spans dropped via beforeSendTransaction

Uh oh!

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

2 participants

@mydea @Lms24
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.