@adcp/client API Reference - v4.19.0
    Preparing search index...

    Function withSpan

    • Execute a function within an OpenTelemetry span. If @opentelemetry/api is not installed, executes the function directly (no-op).

      Type Parameters

      • T

      Parameters

      • name: string

        Span name (e.g., 'adcp.mcp.call_tool')

      • attributes: Record<string, string | number | boolean | undefined>

        Span attributes

      • fn: () => Promise<T>

        Async function to execute within the span

      Returns Promise<T>

      The result of fn()