@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface BotTracer

    The ONLY thing a tracing integration implements. Minimal on purpose, so it can be backed by OpenTelemetry (@botmesh/otel), Datadog, Sentry or a test recorder.

    interface BotTracer {
        startSpan(name: string, options?: SpanOptions): BotSpan;
        withSpan?<T>(span: BotSpan, fn: () => T): T;
    }
    Index
    • Optional: run fn with span active in the backend's own context too, so the backend's auto-instrumentations (http, pg, undici…) nest under bot spans. Must call fn synchronously and return its result unchanged.

      Type Parameters

      • T

      Parameters

      Returns T