@microsoft/applicationinsights-teechannel-js 3.0.0-beta.2304-07
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +17 -0
- package/PRIVACY +3 -0
- package/README.md +81 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.cjs.js +2918 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.cjs.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.cjs.min.js +6 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.cjs.min.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.gbl.js +2922 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.gbl.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.gbl.min.js +6 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.gbl.min.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.integrity.json +66 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.js +2924 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.min.js +6 -0
- package/browser/es5/applicationinsights-teechannel-js.3.0.0-beta.2304-07.min.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.cjs.js +2918 -0
- package/browser/es5/applicationinsights-teechannel-js.3.cjs.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js +6 -0
- package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.gbl.js +2922 -0
- package/browser/es5/applicationinsights-teechannel-js.3.gbl.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js +6 -0
- package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.js +2924 -0
- package/browser/es5/applicationinsights-teechannel-js.3.js.map +1 -0
- package/browser/es5/applicationinsights-teechannel-js.3.min.js +6 -0
- package/browser/es5/applicationinsights-teechannel-js.3.min.js.map +1 -0
- package/dist/es5/applicationinsights-teechannel-js.js +2924 -0
- package/dist/es5/applicationinsights-teechannel-js.js.map +1 -0
- package/dist/es5/applicationinsights-teechannel-js.min.js +6 -0
- package/dist/es5/applicationinsights-teechannel-js.min.js.map +1 -0
- package/dist-es5/ChannelController.js +170 -0
- package/dist-es5/ChannelController.js.map +1 -0
- package/dist-es5/Interfaces/ITeeChannelConfig.js +8 -0
- package/dist-es5/Interfaces/ITeeChannelConfig.js.map +1 -0
- package/dist-es5/TeeChannel.js +137 -0
- package/dist-es5/TeeChannel.js.map +1 -0
- package/dist-es5/__DynamicConstants.js +23 -0
- package/dist-es5/__DynamicConstants.js.map +1 -0
- package/dist-es5/applicationinsights-teechannel-js.js +8 -0
- package/dist-es5/applicationinsights-teechannel-js.js.map +1 -0
- package/package.json +63 -0
- package/tsconfig.json +28 -0
- package/types/applicationinsights-teechannel-js.d.ts +100 -0
- package/types/applicationinsights-teechannel-js.namespaced.d.ts +96 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Microsoft Application Insights JavaScript SDK Tee Channel, 3.0.0-beta.2304-07
|
|
3
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Microsoft Application Insights Team
|
|
6
|
+
* https://github.com/microsoft/ApplicationInsights-JS#readme
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
declare namespace ApplicationInsights {
|
|
10
|
+
import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
|
|
11
|
+
import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
|
|
12
|
+
import { IChannelControls } from '@microsoft/applicationinsights-core-js';
|
|
13
|
+
import { IChannelControlsHost } from '@microsoft/applicationinsights-core-js';
|
|
14
|
+
import { IConfig } from '@microsoft/applicationinsights-common';
|
|
15
|
+
import { IConfiguration } from '@microsoft/applicationinsights-core-js';
|
|
16
|
+
import { IPlugin } from '@microsoft/applicationinsights-core-js';
|
|
17
|
+
import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
|
|
18
|
+
import { IProcessTelemetryUnloadContext } from '@microsoft/applicationinsights-core-js';
|
|
19
|
+
import { IProcessTelemetryUpdateContext } from '@microsoft/applicationinsights-core-js';
|
|
20
|
+
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
21
|
+
import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
|
|
22
|
+
import { ITelemetryUnloadState } from '@microsoft/applicationinsights-core-js';
|
|
23
|
+
import { ITelemetryUpdateState } from '@microsoft/applicationinsights-core-js';
|
|
24
|
+
|
|
25
|
+
interface ITeeChannelConfig {
|
|
26
|
+
/**
|
|
27
|
+
* Channel queues that is setup by caller in desired order.
|
|
28
|
+
* If channels are provided here, core will ignore any channels that are already setup, example if there is a SKU with an initialized channel
|
|
29
|
+
*/
|
|
30
|
+
teeChannels?: IChannelControls[][];
|
|
31
|
+
/**
|
|
32
|
+
* By default the TeeChannel will use the core configuration `channels` (starting at index 1 `channels[1.xxx]`) as separate tee'd channel chains
|
|
33
|
+
* for processing events. This configuration allow you to ignore any additional core channels and only use the `teeChannels`
|
|
34
|
+
* Defaults to false
|
|
35
|
+
*/
|
|
36
|
+
ignoreCoreChannels?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
class TeeChannel extends BaseTelemetryPlugin implements IChannelControlsHost {
|
|
40
|
+
readonly identifier: string;
|
|
41
|
+
readonly priority: number;
|
|
42
|
+
/**
|
|
43
|
+
* Returns whether the plugin has been initialized
|
|
44
|
+
*/
|
|
45
|
+
isInitialized: () => boolean;
|
|
46
|
+
constructor();
|
|
47
|
+
initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
48
|
+
getTeeChannels(): IChannelControls[][];
|
|
49
|
+
processTelemetry(telemetryItem: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
50
|
+
/**
|
|
51
|
+
* Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
|
|
52
|
+
* therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
|
|
53
|
+
* processTelemetry calls are ignored and it just calls the processNext() with the provided context.
|
|
54
|
+
* @param unloadCtx - This is the context that should be used during unloading.
|
|
55
|
+
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
56
|
+
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
57
|
+
*/
|
|
58
|
+
teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The the plugin should re-evaluate configuration and update any cached configuration settings.
|
|
61
|
+
* @param updateCtx - This is the context that should be used during updating.
|
|
62
|
+
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
63
|
+
* @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
|
|
64
|
+
*/
|
|
65
|
+
update(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Pause the sending (transmission) of events, this will cause all events to be batched only until the maximum limits are
|
|
68
|
+
* hit at which point new events are dropped. Will also cause events to NOT be sent during page unload, so if Session storage
|
|
69
|
+
* is disabled events will be lost.
|
|
70
|
+
* SessionStorage Limit is 2000 events, In-Memory (Array) Storage is 10,000 events (can be configured via the eventsLimitInMem).
|
|
71
|
+
*/
|
|
72
|
+
pause(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Resume the sending (transmission) of events, this will restart the timer and any batched events will be sent using the normal
|
|
75
|
+
* send interval.
|
|
76
|
+
*/
|
|
77
|
+
resume(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Flush the batched events immediately (not synchronously).
|
|
80
|
+
* Will not flush if the Sender has been paused.
|
|
81
|
+
*/
|
|
82
|
+
flush(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Flush the batched events synchronously (if possible -- based on configuration).
|
|
85
|
+
* Will not flush if the Send has been paused.
|
|
86
|
+
*/
|
|
87
|
+
onunloadFlush(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Get and return the named channel instance (if present) from the queues
|
|
90
|
+
* @param pluginIdentifier - The identifier name of the plugin
|
|
91
|
+
*/
|
|
92
|
+
getChannel<T extends IPlugin = IPlugin>(pluginIdentifier: string): T;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
}
|