monitor-api - v1.8.0
    Preparing search index...

    Interface ProductionReportConfig

    Configuration for periodic production reporting.

    interface ProductionReportConfig {
        endpoint: string;
        flushOnHide?: boolean;
        headers?: Record<string, string>;
        interval: number;
        maxPayloadBytes?: number;
        retry?: ProductionReportRetryPolicy;
        timeout?: number | false;
        transform?: (snap: MonitorSnapshot) => unknown;
        transport?: ProductionReportTransport;
    }
    Index

    Properties

    endpoint: string

    HTTP endpoint that receives monitor snapshots.

    flushOnHide?: boolean

    Sends one final report, without retries, when the page is hidden or unloaded, so data captured since the last interval is not lost. Defaults to true.

    headers?: Record<string, string>

    Additional HTTP headers, including authorization or tenant headers.

    interval: number

    Reporting interval in milliseconds.

    maxPayloadBytes?: number

    Maximum UTF-8 JSON body size. Defaults to 65,536 bytes, including custom payloads.

    Optional policy for retrying failed or timed-out deliveries.

    timeout?: number | false

    Maximum time per delivery attempt in milliseconds. Defaults to interval, capped at 30,000 ms, so a hung request cannot block later reports. Use false to disable it.

    transform?: (snap: MonitorSnapshot) => unknown

    Optional mapper used to customize the payload before it is posted. It receives the full, potentially sensitive snapshot; without it, the reporter sends only bounded aggregates.

    Custom report transport. Defaults to an HTTP POST through fetch.