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

[v9] Disallow returning null from beforeSendSpan and also pass root spans #14336

Open
lforst opened this issue Nov 18, 2024 · 1 comment · May be fixed by #14831
Open

[v9] Disallow returning null from beforeSendSpan and also pass root spans #14336

lforst opened this issue Nov 18, 2024 · 1 comment · May be fixed by #14831
Assignees
Milestone

Comments

@lforst
Copy link
Member

lforst commented Nov 18, 2024

Description

In #14335 deprecated null to be returned from beforeSendSpan.

We should adjust the behaviour to either

  • Noop and warn when null is returned
  • Throw when null is returned

In either case the type needs to be updated.

Additionally, root spans also need to be passed to beforeSendSpan <-- This will require a migration/changelog entry.

@lforst lforst added this to the 9.0.0 milestone Nov 18, 2024
@lforst lforst changed the title [v9] Disallow returning null from beforeSendSpan [v9] Disallow returning null from beforeSendSpan and also pass root spans Nov 27, 2024
@chargome chargome self-assigned this Dec 18, 2024
@chargome
Copy link
Member

Quick update: Since the param types of beforeSendSpan do not allow passing an event, we just discussed to try to see if this hook can be called earlier in the code (e.g. before creating the event). This would avoid adding all the code for destructuring the root span out of the event object and then writing back to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants