跳转到内容
简体中文

Span

此内容尚不支持你的语言。

Defined in: src/tracing/Tracer.ts:55

readonly ended: boolean

Defined in: src/tracing/Tracer.ts:64

True after end() has been called.

context(): SpanContext

Defined in: src/tracing/Tracer.ts:57

The span’s own context — what children would inherit.

SpanContext


end(endTimeMs?): void

Defined in: src/tracing/Tracer.ts:62

End the span. Idempotent — second call is a no-op.

number

void


recordException(err): this

Defined in: src/tracing/Tracer.ts:60

Error

this


setAttribute(key, value): this

Defined in: src/tracing/Tracer.ts:58

string

AttributeValue

this


setStatus(status, message?): this

Defined in: src/tracing/Tracer.ts:59

"error" | "ok"

string

this