Protected
Optional
_doTeardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin finishes it's removal.
Optional
unloadCtx: IProcessTelemetryUnloadContextThis is the context that should be used during unloading.
Optional
unloadState: ITelemetryUnloadStateThe details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
Optional
asyncCallback: (() => void)An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
Protected
Optional
_doExtension hook to allow implementations to perform some additional update operations before the BaseTelemetryPlugin finishes it's removal
Optional
updateCtx: IProcessTelemetryUpdateContextThis is the context that should be used during updating.
Optional
updateState: ITelemetryUpdateStateThe details / state of the update process, it holds details like the current and previous configuration.
Optional
asyncCallback: (() => void)An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async update operations.
boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
Protected
_getHelper to return the current IProcessTelemetryContext, if the passed argument exists this just returns that value (helps with minification for callers), otherwise it will return the configured context or a temporary one.
Optional
currentCtx: IProcessTelemetryContext[Optional] The current execution context
Protected
Readonly
_unloadExposes the underlying unload hook container instance for this extension to allow it to be passed down to any sub components of the class. This should NEVER be exposed or called publically as it's scope is for internal use by BaseTelemetryPlugin and any derived class (which is why it's scoped as protected)
Readonly
configHolds the core instance that was used during initialization
Returns the current diagnostic logger that can be used to log issues, if no logger is currently assigned a new default one will be created and returned.
Returns whether the plugin has been initialized
Call back for telemetry processing before it it is sent
This is the current event being reported
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)
Protected
setInternal helper to allow setting of the internal initialized setting for inherited instances and unit testing
Set next extension for telemetry processing
Optional
versionPlugin version (available in data.properties.version in common schema)
Static
VersionProtected
_addAdd this hook so that it is automatically removed during unloading
The single hook or an array of IInstrumentHook objects
Protected
_addCreate a page view telemetry item and send it to the SDK pipeline through the core.track API
Page view item to be sent
Optional
properties: { Custom properties (Part C) that a user can add to the telemetry item
Optional
systemProperties: { System level properties (Part A) that a user can add to the telemetry item
Starts the timer for tracking a page load time. Use this instead of trackPageView
if you want to control when the page view timer starts and stops,
but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call stopTrackPage
to log the end of the page view
and send the event.
Optional
name: stringA string that idenfities this item, unique within this HTML document. Defaults to the document title.
Log an extended event that you started timing with startTrackEvent
.
The string you used to identify this event in startTrackEvent
.
Optional
properties: { map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
Optional
measurements: { map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
Stops the timer that was started by calling startTrackPage
and sends the pageview load time telemetry with the specified properties and measurements.
The duration of the page view will be the time between calling startTrackPage
and stopTrackPage
.
Optional
name: stringThe string you used as the name in startTrackPage. Defaults to the document title.
Optional
url: stringString - a relative or absolute URL that identifies the page or other item. Defaults to the window location.
Optional
properties: { map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.
Optional
measurement: { Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further processTelemetry calls are ignored and it just calls the processNext() with the provided context.
Optional
unloadCtx: IProcessTelemetryUnloadContextThis is the context that should be used during unloading.
Optional
unloadState: ITelemetryUnloadStateThe details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
input object argument. Only name and average are mandatory.
Optional
customProperties: ICustomPropertiesLog a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators. To send single measurement, just use the name and average fields of IMetricTelemetry. If you take measurements frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals
Logs that a page or other item was viewed.
Optional
pageView: IPageViewTelemetryOptional
customProperties: ICustomPropertiesAdditional data used to filter events and metrics. Defaults to empty. If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration
The the plugin should re-evaluate configuration and update any cached configuration settings.
This is the context that should be used during updating.
The details / state of the update process, it holds details like the current and previous configuration.
boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
Internal interface to pass appInsights object to subcomponents without coupling