Beignet API reference
    Preparing search index...

    Type Alias EntitlementDecisionObservation<TContext, TKey>

    Best-effort entitlement decision observation emitted by an entitlements port.

    Observers are diagnostic only. They do not participate in entitlement control flow and thrown/rejected observer errors are ignored.

    type EntitlementDecisionObservation<
        TContext = unknown,
        TKey extends EntitlementKey = EntitlementKey,
    > = {
        ctx?: TContext;
        decision?: EntitlementDecision;
        durationMs: number;
        entitlement: TKey;
        error?: unknown;
        parentSpanId?: string;
        requestId?: string;
        source: EntitlementDecisionSource;
        spanId?: string;
        subject: EntitlementSubject;
        traceId?: string;
        traceparent?: string;
    }

    Type Parameters

    Index
    ctx?: TContext

    Application context passed by the caller, when available.

    Normalized decision, when resolver evaluation returned normally.

    durationMs: number

    Resolver duration, excluding observer work.

    entitlement: TKey

    Capability being evaluated.

    error?: unknown

    Error thrown by the resolver, when evaluation failed.

    parentSpanId?: string
    requestId?: string

    Correlation fields copied from the context when present.

    Port helper that produced the decision.

    spanId?: string

    Subject whose product access is checked.

    traceId?: string
    traceparent?: string