traceEnd() function

Finishes the span trace() opened under this name and releases it, so the name can be reused.

Signature:

export declare function traceEnd(name: string): void;

Parameters

Parameter

Type

Description

name

string

the name the span was started under

Returns:

void

Remarks

An unknown or already-finished name is a silent no-op, not an error — safe to call from a finally block without checking whether the span was started. The flip side is that a misspelled name fails silently and leaves the real span open and unreported.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.