Associates this span with a related span. Links can reference spans from the same or different trace and are typically used for batch operations, cross-trace scenarios, or scatter/gather patterns.
Prefer setting links directly when starting a span (e.g. Sentry.startSpan()) as some context information is only available during span creation.
The link containing the context of the span to link to and optional attributes
Associates this span with multiple related spans. See addLink for more details.
Prefer setting links directly when starting a span (e.g. Sentry.startSpan()) as some context information is only available during span creation.
Array of links to associate with this span
End the current span.
OptionalendTimestamp: SpanTimeInputIf this is span is actually recording data. This will return false if tracing is disabled, this span was not sampled or if the span is already finished.
NOT USED IN SENTRY, only added for compliance with OTEL Span interface
Optionaltime: numberSet a single attribute on the span.
Set it to undefined to remove the attribute.
Set multiple attributes on the span.
Any attribute set to undefined will be removed.
Sets the status attribute on the current span.
Get context data for this span. This includes the spanId & the traceId.
Update the name of the span.
Important: You most likely want to use Sentry.updateSpanName(span, name) instead!
This method will update the current span name but cannot guarantee that the new name will be
the final name of the span. Instrumentation might still overwrite the name with an automatically
computed name, for example in http.server or db spans.
You can ensure that your name is kept and not overwritten by calling Sentry.updateSpanName(span, name)
the new name of the span
A generic Span which holds trace data.