Closed
Description
To be ready for an only-spans world, and also handle e.g. INP spans that even today are not sent in a transaction, we want to add a new option to the client: beforeSendSpan
.
This should receive a SpanJSON
span, allowing to mutate (but not drop) this before it is sent.
This should apply both for transaction events being sent (applying to all event.spans
on the event), as well as to standalone spans sent via createSpanEnvelope()
.
It should look something like this:
interface ClientOptions {
beforeSendSpan: (span: SpanJSON): SpanJSON;
}
The return value will replace the original span. We will not allow to return null
here now. The callback should run before the full event is passed to beforeSendTransaction
.
Metadata
Metadata
Assignees
Labels
No labels