traceperf
    Preparing search index...

    Interface TracePerfPlugin

    Extension point for exporters and custom sinks. Hooks run synchronously; errors thrown by a plugin are caught and reported once, never propagated into the tracked code.

    interface TracePerfPlugin {
        name?: string;
        onComplete?(root: ExecutionRecord): void;
        onStart?(execution: ExecutionStart): void;
        wrap?<R>(execution: ExecutionStart, run: () => R): R;
    }

    Hierarchy (View Summary)

    Index
    name?: string

    Optional name used in error messages

    • Run the tracked code inside something (e.g. an active OpenTelemetry span). Must call run exactly once and return its result.

      Type Parameters

      • R

      Parameters

      Returns R