Skip to main content
Module

x/sentry/index.d.ts>Span

The Official Sentry Deno SDK
Go to Latest
interface Span
import { type Span } from "https://deno.land/x/sentry@8.0.0-alpha.2/index.d.ts";

A generic Span which holds trace data.

Methods

spanContext(): SpanContextData

Get context data for this span. This includes the spanId & the traceId.

end(endTimestamp?: SpanTimeInput): void

End the current span.

setAttribute(key: string, value: SpanAttributeValue | undefined): void

Set a single attribute on the span. Set it to undefined to remove the attribute.

setAttributes(attributes: SpanAttributes): void

Set multiple attributes on the span. Any attribute set to undefined will be removed.

setStatus(status: SpanStatus): this

Sets the status attribute on the current span.

updateName(name: string): this

Update the name of the span.

isRecording(): boolean

If 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.