A send buffer object
Protected Optional_doTeardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin finishes it's removal.
OptionalunloadCtx: IProcessTelemetryUnloadContextThis is the context that should be used during unloading.
OptionalunloadState: 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.
OptionalasyncCallback: (() => 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
OptionalupdateCtx: IProcessTelemetryUpdateContextThis is the context that should be used during updating.
OptionalupdateState: ITelemetryUpdateStateThe details / state of the update process, it holds details like the current and previous configuration.
OptionalasyncCallback: (() => 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.
OptionalcurrentCtx: IProcessTelemetryContext[Optional] The current execution context
Protected_sampleA method which will cause data to be send to the url
Readonly_senderThe configuration for this sender instance
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)
Holds 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.
ReadonlyidentifierReturns whether the plugin has been initialized
ReadonlypriorityCall 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)
ProtectedsetInternal helper to allow setting of the internal initialized setting for inherited instances and unit testing
OptionalsetSet next extension for telemetry processing, this is now optional as plugins should use the processNext() function of the passed IProcessTelemetryContext instead. It is being kept for now for backward compatibility only.
OptionalversionPlugin version (available in data.properties.version in common schema)
Protected_addAdd this hook so that it is automatically removed during unloading
The single hook or an array of IInstrumentHook objects
Protected_addStaticconstructOptionalconvertUndefined: anyFlush to send data immediately; channel should default to sending data asynchronously. If executing asynchronously (the default) and
you DO NOT pass a callback function then a IPromise
will be returned which will resolve once the flush is complete. The actual implementation of the IPromise
will be a native Promise (if supported) or the default as supplied by ts-async library
OptionalisAsync: booleansend data asynchronously when true
OptionalcallBack: ((flushComplete?: boolean) => void)if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called. If the caller doesn't return true the caller should assume that it may never be called.
OptionalflushComplete: booleanOptionalsendReason: SendRequestReasonspecify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
true to indicate that callback will be called after the flush is complete otherwise the caller
should assume that any provided callback will never be called, Nothing or if occurring asynchronously a
IPromise which will be resolved once the unload is complete,
the IPromise will only be returned when no callback is provided
and isAsync is true.OptionalpluginChain: ITelemetryPluginChainPause the sending (transmission) of events, this will cause all events to be batched only until the maximum limits are hit at which point new events are dropped. Will also cause events to NOT be sent during page unload, so if Session storage is disabled events will be lost. SessionStorage Limit is 2000 events, In-Memory (Array) Storage is 10,000 events (can be configured via the eventsLimitInMem).
OptionalitemCtx: IProcessTelemetryContextTear 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.
OptionalunloadCtx: IProcessTelemetryUnloadContextThis is the context that should be used during unloading.
OptionalunloadState: 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.
Trigger the immediate send of buffered data; If executing asynchronously (the default) this may (not required) return
an IPromise that will resolve once the
send is complete. The actual implementation of the IPromise will be a native Promise (if supported) or the default
as supplied by ts-async library
OptionalisAsync: booleanIndicates if the events should be sent asynchronously
OptionalforcedSender: SenderFunctionIndicates the forcedSender, undefined if not passed
OptionalsendReason: SendRequestReasonThe 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.
AppId of this component parsed from some backend response.