dd-trace
    Preparing search index...

    Interface DataStreamsCheckpointer

    Manual Data Streams Monitoring checkpointer API.

    interface DataStreamsCheckpointer {
        setConsumeCheckpoint(
            type: string,
            source: string,
            carrier: any,
            manualCheckpoint?: boolean,
        ): any;
        setProduceCheckpoint(type: string, target: string, carrier: any): void;
        trackTransaction(
            transactionId: string,
            checkpointName: string,
            span?: Span | null,
        ): void;
    }
    Index

    Methods

    • Sets a consume checkpoint and extracts DSM context from the provided carrier.

      Parameters

      • type: string

        The streaming technology (e.g., kafka, kinesis, sns).

      • source: string

        The source of data (topic, exchange, stream name).

      • carrier: any

        The carrier object to extract DSM context from.

      • OptionalmanualCheckpoint: boolean

        Whether this checkpoint was manually set. Defaults to true.

      Returns any

      The DSM context associated with the current pathway.

    • Sets a produce checkpoint and injects the DSM context into the provided carrier.

      Parameters

      • type: string

        The streaming technology (e.g., kafka, kinesis, sns).

      • target: string

        The target of data (topic, exchange, stream name).

      • carrier: any

        The carrier object to inject DSM context into.

      Returns void

    • Records a transaction ID at a named checkpoint without pathway propagation. Tags the active span (or the provided span) with dsm.transaction.id and dsm.transaction.checkpoint.

      Parameters

      • transactionId: string

        The unique transaction identifier (truncated to 255 UTF-8 bytes).

      • checkpointName: string

        The logical checkpoint name (stable 1-byte ID per process lifetime).

      • Optionalspan: Span | null

        The span to tag. Defaults to the currently active span.

      Returns void