Skip to content

docs(core): Fix docs for beforeSendSpan #16129

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

Merged
merged 2 commits into from
Apr 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/src/types-hoist/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
beforeSend?: (event: ErrorEvent, hint: EventHint) => PromiseLike<ErrorEvent | null> | ErrorEvent | null;

/**
* This function can be defined to modify or entirely drop a child span before it's sent.
* This function can be defined to modify a child span before it's sent.
* Returning `null` will cause this span to be dropped.
*
* Note that this function is only called for child spans and not for the root span (formerly known as transaction).
* If you want to modify or drop the root span, use {@link Options.beforeSendTransaction} instead.
*
* @param span The span generated by the SDK.
*
* @returns A new span that will be sent or null if the span should not be sent.
* @returns The modified span payload that will be sent.
*/
beforeSendSpan?: (span: SpanJSON) => SpanJSON;

Expand Down
Loading