datadog-ux-utils Documentation - v1.0.0
    Preparing search index...

    Function timePromise

    • Times a promise and adds a Datadog RUM action if it is slow.

      Type Parameters

      • T

      Parameters

      • label: string

        Label for the promise.

      • p: Promise<T>

        The promise to time.

      • Optionalmeta: Record<string, unknown>

        Optional metadata to include in the RUM action.

      Returns Promise<T>

      The resolved value of the promise.