diff --git a/packages/types/src/options.ts b/packages/types/src/options.ts index 82123c01a380..5179c1fdb70e 100644 --- a/packages/types/src/options.ts +++ b/packages/types/src/options.ts @@ -286,11 +286,15 @@ export interface ClientOptions PromiseLike | ErrorEvent | null; /** - * An event-processing callback for spans. This allows a span to be modified before it's sent. - * + * This function can be defined to modify or entirely drop 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 | null. + * + * @returns A new span that will be sent or null if the span should not be sent. */ beforeSendSpan?: (span: SpanJSON) => SpanJSON | null;