CoAgent8 - Source API
    Preparing search index...

    Monotonic tracker for recording execution phases and spans.

    Index
    • Closes the most recently started unclosed span matching the specified name, or the most recently started unclosed span if name is omitted.

      Parameters

      • Optionalname: string

      Returns void

    • Executes an asynchronous action wrapped inside a named phase. Span is guaranteed to close even if the action rejects.

      Type Parameters

      • T

      Parameters

      • name: string
      • fn: () => Promise<T>

      Returns Promise<T>

    • Executes a synchronous action wrapped inside a named phase. Span is guaranteed to close even if the action throws.

      Type Parameters

      • T

      Parameters

      • name: string
      • fn: () => T

      Returns T