Edit

TelemetryInitializerMiddleware class

Middleware for storing the incoming activity to be made available to Application Insights and optionally run the TelemetryLoggerMiddleware. Uses the botTelemetryClient interface.

Constructors

TelemetryInitializerMiddleware(TelemetryLoggerMiddleware, boolean)

Initializes a new instance of the TelemetryInitializerMiddleware class.

Properties

logActivityTelemetry

Gets a value indicating whether determines whether to call the telemetry logging middleware to log activity events.

telemetryClient

Gets the currently configured TelemetryLoggerMiddleware that logs activity events.

Methods

onTurn(TurnContext, () => Promise<void>)

Store the incoming activity on the App Insights Correlation Context and optionally calls the TelemetryLoggerMiddleware

Constructor Details

TelemetryInitializerMiddleware(TelemetryLoggerMiddleware, boolean)

Initializes a new instance of the TelemetryInitializerMiddleware class.

new TelemetryInitializerMiddleware(telemetryLoggerMiddleware: TelemetryLoggerMiddleware, logActivityTelemetry?: boolean)

Parameters

telemetryLoggerMiddleware

TelemetryLoggerMiddleware

The TelemetryLoggerMiddleware used for logging activity telemetry.

logActivityTelemetry

boolean

(Optional) Enable/Disable logging of activity telemetry.

Property Details

logActivityTelemetry

Gets a value indicating whether determines whether to call the telemetry logging middleware to log activity events.

boolean logActivityTelemetry

Property Value

boolean

whether or not to log activity telemetry

telemetryClient

Gets the currently configured TelemetryLoggerMiddleware that logs activity events.

TelemetryLoggerMiddleware telemetryClient

Property Value

TelemetryLoggerMiddleware

telemetry logger middleware

Method Details

onTurn(TurnContext, () => Promise<void>)

Store the incoming activity on the App Insights Correlation Context and optionally calls the TelemetryLoggerMiddleware

function onTurn(context: TurnContext, next: () => Promise<void>): Promise<void>

Parameters

context

TurnContext

The context object for this turn.

next

() => Promise<void>

The delegate to call to continue the bot middleware pipeline

Returns

Promise<void>