Configuration provided to SDK core

interface ITelemetryPluginChain {
    getNext: (() => ITelemetryPluginChain);
    getPlugin: (() => ITelemetryPlugin);
    processTelemetry: ((env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void);
    unload?: ((unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void);
    update?: ((updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState) => boolean | void);
}

Hierarchy

  • ITelemetryProcessor
    • ITelemetryPluginChain

Properties

getNext: (() => ITelemetryPluginChain)

Returns the next plugin

getPlugin: (() => ITelemetryPlugin)

Returns the underlying plugin that is being proxied for the processTelemetry call

processTelemetry: ((env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void)

Call back for telemetry processing before it it is sent

Type declaration

    • (env, itemCtx?): void
    • Parameters

      • env: ITelemetryItem

        This is the current event being reported

      • OptionalitemCtx: 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 void

unload?: ((unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void)

This plugin is being unloaded and should remove any hooked events and cleanup any global/scoped values, after this call the plugin will be removed from the telemetry processing chain and will no longer receive any events..

Type declaration

update?: ((updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState) => boolean | void)

The the plugin should re-evaluate configuration and update any cached configuration settings or plugins. If implemented this method will be called whenever a plugin is added or removed and if the configuration has bee updated.

Type declaration

    • (updateCtx, updateState): boolean | void
    • Parameters

      Returns boolean | void

      boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.