interface IOfflineProvider {
    addEvent(key: string, evt: IStorageTelemetryItem, itemCtx: IProcessTelemetryContext): IStorageTelemetryItem | IPromise<IStorageTelemetryItem>;
    clean(disable?: boolean): boolean | IPromise<boolean>;
    clear(): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]>;
    getAllEvents(cnt?: number): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]>;
    getNextBatch(): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]>;
    initialize(providerContext: ILocalStorageProviderContext): boolean;
    removeEvents(evts: IStorageTelemetryItem[]): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]>;
    supportsSyncRequests(): boolean;
    teardown(): void;
}

Implemented by

Methods

  • Stores the value into the storage using the specified key.

    Parameters

    • key: string

      The key value to use for the value

    • evt: IStorageTelemetryItem

      The actual event of the request

    • itemCtx: IProcessTelemetryContext

      This is the context for the current request, ITelemetryPlugin instances can optionally use this to access the current core instance or define / pass additional information to later plugins (vs appending items to the telemetry item)

    Returns IStorageTelemetryItem | IPromise<IStorageTelemetryItem>

    Either the added element (for synchronous operation) or a Promise for an asynchronous processing

  • Removes all entries with stroage time longer than inStorageMaxTime from the storage provider

    Parameters

    • Optionaldisable: boolean

    Returns boolean | IPromise<boolean>

  • Initializes the provider using the config

    Parameters

    Returns boolean

    True if the provider is initialized and available for use otherwise false