// engine/observability/noop-tracer.ts — Zero-overhead Tracer implementation (SPEC-165)
// Used when OTel is disabled (default). All methods are pure no-ops.
// ---------------------------------------------------------------------------
// NoopSpanHandle — no-op span with safe, idempotent methods
// ---------------------------------------------------------------------------
class NoopSpanHandle {
    setAttribute(_key, _value) {
        // no-op
    }
    recordError(_error) {
        // no-op
    }
    end(_status) {
        // no-op
    }
}
// Reuse the same singleton to avoid GC pressure on hot paths.
const NOOP_SPAN = new NoopSpanHandle();
// ---------------------------------------------------------------------------
// NoopTracer — satisfies the Tracer interface at zero cost
// ---------------------------------------------------------------------------
/**
 * No-op tracer used when OTel is not configured.
 * All methods are synchronous and return immediately.
 * No memory allocations on hot paths (reuses NOOP_SPAN singleton).
 */
export class NoopTracer {
    startSpan(_name, _attributes) {
        return NOOP_SPAN;
    }
    startChildSpan(_name, _parent, _attributes) {
        return NOOP_SPAN;
    }
    recordCounter(_name, _value, _attributes) {
        // no-op
    }
    recordHistogram(_name, _value, _attributes) {
        // no-op
    }
}
//# sourceMappingURL=noop-tracer.js.map