This class will be removed!

use createProcessTelemetryContext() instead

Implements

Constructors

Properties

Returns the IAppInsightsCore instance for the current request

createNew: ((plugins?: ITelemetryPluginChain | IPlugin[], startAt?: IPlugin) => IProcessTelemetryContext)

Create a new context using the core and config from the current instance

Type declaration

diagLog: (() => IDiagnosticLogger)

Returns the current IDiagnosticsLogger for the current request

getCfg: (() => IConfiguration)

Gets the current core config instance

getConfig: ((identifier: string, field: string, defaultValue?:
    | string
    | number
    | boolean
    | Function
    | string[]
    | RegExp[]) =>
    | string
    | number
    | boolean
    | Function
    | string[]
    | RegExp[])

Gets the named config from either the named identifier extension or core config if neither exist then the default value is returned

Type declaration

    • (identifier, field, defaultValue?):
          | string
          | number
          | boolean
          | Function
          | string[]
          | RegExp[]
    • Parameters

      • identifier: string

        The named extension identifier

      • field: string

        The config field name

      • OptionaldefaultValue:
            | string
            | number
            | boolean
            | Function
            | string[]
            | RegExp[]

        The default value to return if no defined config exists

      Returns
          | string
          | number
          | boolean
          | Function
          | string[]
          | RegExp[]

getExtCfg: (<T>(identifier: string, defaultValue?: IConfigDefaults<T, IConfiguration>) => T)

Gets the named extension config

getNext: (() => ITelemetryPluginChain)

Returns the next configured plugin proxy

hasNext: (() => boolean)

Helper to allow inherited classes to check and possibly shortcut executing code only required if there is a nextPlugin

iterate: (<T>(callback: ((plugin: T) => void)) => void)

Synchronously iterate over the context chain running the callback for each plugin, once every plugin has been executed via the callback, any associated onComplete will be called.

Type declaration

    • <T>(callback): void
    • Type Parameters

      Parameters

      • callback: ((plugin: T) => void)

        The function call for each plugin in the context chain

          • (plugin): void
          • Parameters

            • plugin: T

            Returns void

      Returns void

onComplete: ((onComplete: (() => void)) => void)

Set the function to call when the current chain has executed all processNext or unloadNext items.

processNext: ((env: ITelemetryItem) => boolean | void)

Call back for telemetry processing before it it is sent

Type declaration

    • (env): boolean | void
    • Parameters

      Returns boolean | void

      boolean (true) if there is no more plugins to process otherwise false or undefined (void)

setNext: ((nextCtx: ITelemetryPluginChain) => void)

Helper to set the next plugin proxy