The current context for the current call to processTelemetry(), used to support sharing the same plugin instance between multiple AppInsights instances

Hierarchy

Implemented by

Properties

Type declaration

createNew: ((plugins?, startAt?) => IProcessTelemetryContext)

Type declaration

    • (plugins?, startAt?): IProcessTelemetryContext
    • Create a new context using the core and config from the current instance, returns a new instance of the same type

      Parameters

      • Optional plugins: ITelemetryPluginChain | IPlugin[]

        The execution order to process the plugins, if null or not supplied then the current execution order will be copied.

      • Optional startAt: IPlugin

        The plugin to start processing from, if missing from the execution order then the next plugin will be NOT set.

      Returns IProcessTelemetryContext

diagLog: (() => IDiagnosticLogger)

Type declaration

getCfg: (() => IConfiguration)

Type declaration

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

Type declaration

    • (identifier, field, defaultValue?): 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

      Parameters

      • identifier: string

        The named extension identifier

      • field: string

        The config field name

      • Optional defaultValue: 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, defaultValue?) => T)

Type declaration

    • <T>(identifier, defaultValue?): T
    • Gets the named extension config

      Type Parameters

      • T

      Parameters

      Returns T

getNext: (() => ITelemetryPluginChain)

Type declaration

hasNext: (() => boolean)

Type declaration

    • (): boolean
    • Helper to allow plugins to check and possibly shortcut executing code only required if there is a nextPlugin

      Returns boolean

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

Type declaration

    • <T>(callback): 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 Parameters

      Parameters

      • callback: ((plugin) => void)

        The function call for each plugin in the context chain

          • (plugin): void
          • Parameters

            • plugin: T

            Returns void

      Returns void

onComplete: ((onComplete, that?, ...args) => void)

Type declaration

    • (onComplete, that?, ...args): void
    • Set the function to call when the current chain has executed all processNext or unloadNext items.

      Parameters

      • onComplete: (() => void)

        The onComplete to call

          • (): void
          • Returns void

      • Optional that: any

        The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context

      • Rest ...args: any[]

        Any additional arguments to pass to the onComplete function

      Returns void

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

Type declaration

    • (env): boolean | void
    • Call back for telemetry processing before it it is sent

      Parameters

      Returns boolean | void

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

setNext: ((nextCtx) => void)

Type declaration

    • (nextCtx): void
    • Helper to set the next plugin proxy

      Parameters

      Returns void

Generated using TypeDoc