Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(javascript): Improve beforeSendSpan documentation #10907

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 30, 2024

This small PR adds a sentence to the existing beforeSendSpan documentation that the callback is only applied to child spans and beforeSendTransaction should be used to drop entire span trees/transactions. Also reworded the description slightly.

Making this change because users seemed to be confused about when beforeSendSpan is applied.

Copy link

vercel bot commented Jul 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
changelog ❌ Failed (Inspect) Jul 30, 2024 8:52am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 8:52am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 30, 2024 8:52am

@@ -213,13 +213,15 @@ If the transaction currently being processed has a parent transaction (from an u

Learn more about <PlatformLink to="/configuration/sampling/">configuring the sample rate</PlatformLink>.

### Using <PlatformIdentifier name="before-send-transaction" />
### Using `beforeSendTransaction`
Copy link
Member Author

Choose a reason for hiding this comment

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

I changed this to the plain string because 1. I don't think <PlatformIdentifier> does anything here since it's a JS-specific docs page and 2. I can't link to this heading properly because of #10613.

Happy to wait with merging this PR until the issue is fixed but I still don't see why we need PlatformIdentifier at all here.

@Lms24 Lms24 requested review from chargome, a team and AbhiPrasad and removed request for a team July 30, 2024 08:39
Copy link

codecov bot commented Jul 30, 2024

Bundle Report

Changes will increase total bundle size by 206.85kB ⬆️

Bundle name Size Change
sentry-docs-server 9.74MB 206.86kB ⬆️
sentry-docs-edge-server 255.36kB 3 bytes ⬇️
sentry-docs-client 8.18MB 6 bytes ⬇️

@Lms24 Lms24 self-assigned this Jul 30, 2024
@Lms24
Copy link
Member Author

Lms24 commented Jul 31, 2024

Gonna merge this because it came up today again in an issue.

@Lms24 Lms24 merged commit 3f6ecfc into master Jul 31, 2024
7 of 9 checks passed
@Lms24 Lms24 deleted the lms/ref-improve-beforeSendSpan-doc branch July 31, 2024 10:01
Lms24 added a commit to getsentry/sentry-javascript that referenced this pull request Jul 31, 2024
This PR changes the `beforeSendSpan` JSDoc analogously to the docs
change (getsentry/sentry-docs#10907).
It now more clearly points out that `beforeSendSpan` is only called for
child spans but not for root spans.


ref #13119
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants