@dxos/app-toolkit - v0.16.0
    Preparing search index...

    Interface ObservabilityMapping<Op>

    Registers the observability event a successful invocation of an operation stands for.

    A listener over the invocation stream emits the event, so a portable verb is never bound to whichever plugin implements telemetry (mirrors UndoMapping).

    interface ObservabilityMapping<
        Op extends
            Operation.Definition<any, any> = Operation.Definition<any, any>,
    > {
        event: string;
        operation: Op;
        properties?: (
            input: InputOf<Op>,
            output: OutputOf<Op>,
        ) => undefined | Record<string, unknown>;
    }

    Type Parameters

    • Op extends Operation.Definition<any, any> = Operation.Definition<any, any>

      The operation whose invocation the event stands for.

    Index

    Properties

    event: string

    The event name.

    operation: Op

    The operation whose successful invocation emits the event.

    properties?: (
        input: InputOf<Op>,
        output: OutputOf<Op>,
    ) => undefined | Record<string, unknown>

    Derives the event's properties from the invocation's input and output.

    Type declaration

      • (input: InputOf<Op>, output: OutputOf<Op>): undefined | Record<string, unknown>
      • Parameters

        Returns undefined | Record<string, unknown>

        The properties to send, or undefined to skip the event for this invocation.