@microsoft/applicationinsights-clickanalytics-js 3.4.0-nightlybeta3.2505-36 → 3.4.0-nightlybeta3.2507-22
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/README.md +23 -23
- package/browser/es5/{ai.clck.3.4.0-nightlybeta3.2505-36.cjs.js → ai.clck.3.4.0-nightlybeta3.2507-22.cjs.js} +234 -23
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.cjs.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.cjs.min.js +6 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.cjs.min.js.map +1 -0
- package/browser/es5/{ai.clck.3.4.0-nightlybeta3.2505-36.gbl.js → ai.clck.3.4.0-nightlybeta3.2507-22.gbl.js} +236 -25
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.gbl.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.gbl.min.js +6 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.gbl.min.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.integrity.json +66 -0
- package/browser/es5/{ai.clck.3.4.0-nightlybeta3.2505-36.js → ai.clck.3.4.0-nightlybeta3.2507-22.js} +236 -25
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.min.js +6 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-22.min.js.map +1 -0
- package/browser/es5/ai.clck.3.cjs.js +233 -22
- package/browser/es5/ai.clck.3.cjs.js.map +1 -1
- package/browser/es5/ai.clck.3.cjs.min.js +2 -2
- package/browser/es5/ai.clck.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.clck.3.gbl.js +235 -24
- package/browser/es5/ai.clck.3.gbl.js.map +1 -1
- package/browser/es5/ai.clck.3.gbl.min.js +2 -2
- package/browser/es5/ai.clck.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.clck.3.integrity.json +25 -25
- package/browser/es5/ai.clck.3.js +235 -24
- package/browser/es5/ai.clck.3.js.map +1 -1
- package/browser/es5/ai.clck.3.min.js +2 -2
- package/browser/es5/ai.clck.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-clickanalytics-js.js +233 -22
- package/dist/es5/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist/es5/applicationinsights-clickanalytics-js.min.js +2 -2
- package/dist/es5/applicationinsights-clickanalytics-js.min.js.map +1 -1
- package/dist-es5/Behaviours.js +1 -1
- package/dist-es5/ClickAnalyticsPlugin.js +2 -2
- package/dist-es5/ClickAnalyticsPlugin.js.map +1 -1
- package/dist-es5/DataCollector.js +4 -3
- package/dist-es5/DataCollector.js.map +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/Interfaces/Datamodel.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-clickanalytics-js.js +3 -2
- package/dist-es5/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist-es5/common/Utils.js +1 -1
- package/dist-es5/events/PageAction.js +1 -1
- package/dist-es5/events/WebEvent.js +1 -1
- package/dist-es5/handlers/AutoCaptureHandler.js +4 -4
- package/dist-es5/handlers/AutoCaptureHandler.js.map +1 -1
- package/dist-es5/handlers/DomContentHandler.js +1 -1
- package/package.json +4 -4
- package/types/applicationinsights-clickanalytics-js.d.ts +185 -6
- package/types/applicationinsights-clickanalytics-js.namespaced.d.ts +460 -14
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.cjs.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.cjs.min.js +0 -6
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.cjs.min.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.gbl.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.gbl.min.js +0 -6
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.gbl.min.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.integrity.json +0 -66
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.min.js +0 -6
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.2507-22
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -29,9 +29,12 @@ declare namespace ApplicationInsights {
|
|
|
29
29
|
*/
|
|
30
30
|
processNext: (env: ITelemetryItem, itemCtx: IProcessTelemetryContext) => void;
|
|
31
31
|
/**
|
|
32
|
-
* Set next extension for telemetry processing
|
|
32
|
+
* Set next extension for telemetry processing, this is now optional as plugins should use the
|
|
33
|
+
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
34
|
+
* now for backward compatibility only.
|
|
35
|
+
* @deprecated - Use processNext() function of the passed IProcessTelemetryContext instead
|
|
33
36
|
*/
|
|
34
|
-
setNextPlugin
|
|
37
|
+
setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
35
38
|
/**
|
|
36
39
|
* Returns the current diagnostic logger that can be used to log issues, if no logger is currently
|
|
37
40
|
* assigned a new default one will be created and returned.
|
|
@@ -106,6 +109,106 @@ declare namespace ApplicationInsights {
|
|
|
106
109
|
protected _addHook(hooks: IUnloadHook | IUnloadHook[] | Iterator<IUnloadHook> | ILegacyUnloadHook | ILegacyUnloadHook[] | Iterator<ILegacyUnloadHook>): void;
|
|
107
110
|
}
|
|
108
111
|
|
|
112
|
+
/**
|
|
113
|
+
* @copyright Microsoft 2020
|
|
114
|
+
*/
|
|
115
|
+
enum Behavior {
|
|
116
|
+
UNDEFINED = 0,
|
|
117
|
+
NAVIGATIONBACK = 1,
|
|
118
|
+
NAVIGATION = 2,
|
|
119
|
+
NAVIGATIONFORWARD = 3,
|
|
120
|
+
APPLY = 4,
|
|
121
|
+
REMOVE = 5,
|
|
122
|
+
SORT = 6,
|
|
123
|
+
EXPAND = 7,
|
|
124
|
+
REDUCE = 8,
|
|
125
|
+
CONTEXTMENU = 9,
|
|
126
|
+
TAB = 10,
|
|
127
|
+
COPY = 11,
|
|
128
|
+
EXPERIMENTATION = 12,
|
|
129
|
+
PRINT = 13,
|
|
130
|
+
SHOW = 14,
|
|
131
|
+
HIDE = 15,
|
|
132
|
+
MAXIMIZE = 16,
|
|
133
|
+
MINIMIZE = 17,
|
|
134
|
+
BACKBUTTON = 18,
|
|
135
|
+
STARTPROCESS = 20,
|
|
136
|
+
PROCESSCHECKPOINT = 21,
|
|
137
|
+
COMPLETEPROCESS = 22,
|
|
138
|
+
SCENARIOCANCEL = 23,
|
|
139
|
+
DOWNLOADCOMMIT = 40,
|
|
140
|
+
DOWNLOAD = 41,
|
|
141
|
+
SEARCHAUTOCOMPLETE = 60,
|
|
142
|
+
SEARCH = 61,
|
|
143
|
+
SEARCHINITIATE = 62,
|
|
144
|
+
TEXTBOXINPUT = 63,
|
|
145
|
+
VIEWCART = 82,
|
|
146
|
+
ADDWISHLIST = 83,
|
|
147
|
+
FINDSTORE = 84,
|
|
148
|
+
CHECKOUT = 85,
|
|
149
|
+
REMOVEFROMCART = 86,
|
|
150
|
+
PURCHASECOMPLETE = 87,
|
|
151
|
+
VIEWCHECKOUTPAGE = 88,
|
|
152
|
+
VIEWCARTPAGE = 89,
|
|
153
|
+
VIEWPDP = 90,
|
|
154
|
+
UPDATEITEMQUANTITY = 91,
|
|
155
|
+
INTENTTOBUY = 92,
|
|
156
|
+
PUSHTOINSTALL = 93,
|
|
157
|
+
SIGNIN = 100,
|
|
158
|
+
SIGNOUT = 101,
|
|
159
|
+
SOCIALSHARE = 120,
|
|
160
|
+
SOCIALLIKE = 121,
|
|
161
|
+
SOCIALREPLY = 122,
|
|
162
|
+
CALL = 123,
|
|
163
|
+
EMAIL = 124,
|
|
164
|
+
COMMUNITY = 125,
|
|
165
|
+
VOTE = 140,
|
|
166
|
+
SURVEYCHECKPOINT = 145,
|
|
167
|
+
REGISTRATIONINITIATE = 161,
|
|
168
|
+
REGISTRATIONCOMPLETE = 162,
|
|
169
|
+
CANCELSUBSCRIPTION = 163,
|
|
170
|
+
RENEWSUBSCRIPTION = 164,
|
|
171
|
+
CHANGESUBSCRIPTION = 165,
|
|
172
|
+
REGISTRATIONCHECKPOINT = 166,
|
|
173
|
+
CHATINITIATE = 180,
|
|
174
|
+
CHATEND = 181,
|
|
175
|
+
TRIALSIGNUP = 200,
|
|
176
|
+
TRIALINITIATE = 201,
|
|
177
|
+
SIGNUP = 210,
|
|
178
|
+
FREESIGNUP = 211,
|
|
179
|
+
PARTNERREFERRAL = 220,
|
|
180
|
+
LEARNLOWFUNNEL = 230,
|
|
181
|
+
LEARNHIGHFUNNEL = 231,
|
|
182
|
+
SHOPPINGINTENT = 232,
|
|
183
|
+
VIDEOSTART = 240,
|
|
184
|
+
VIDEOPAUSE = 241,
|
|
185
|
+
VIDEOCONTINUE = 242,
|
|
186
|
+
VIDEOCHECKPOINT = 243,
|
|
187
|
+
VIDEOJUMP = 244,
|
|
188
|
+
VIDEOCOMPLETE = 245,
|
|
189
|
+
VIDEOBUFFERING = 246,
|
|
190
|
+
VIDEOERROR = 247,
|
|
191
|
+
VIDEOMUTE = 248,
|
|
192
|
+
VIDEOUNMUTE = 249,
|
|
193
|
+
VIDEOFULLSCREEN = 250,
|
|
194
|
+
VIDEOUNFULLSCREEN = 251,
|
|
195
|
+
VIDEOREPLAY = 252,
|
|
196
|
+
VIDEOPLAYERLOAD = 253,
|
|
197
|
+
VIDEOPLAYERCLICK = 254,
|
|
198
|
+
VIDEOVOLUMECONTROL = 255,
|
|
199
|
+
VIDEOAUDIOTRACKCONTROL = 256,
|
|
200
|
+
VIDEOCLOSEDCAPTIONCONTROL = 257,
|
|
201
|
+
VIDEOCLOSEDCAPTIONSTYLE = 258,
|
|
202
|
+
VIDEORESOLUTIONCONTROL = 259,
|
|
203
|
+
ADBUFFERING = 283,
|
|
204
|
+
ADERROR = 284,
|
|
205
|
+
ADSTART = 285,
|
|
206
|
+
ADCOMPLETE = 286,
|
|
207
|
+
ADSKIP = 287,
|
|
208
|
+
ADTIMEOUT = 288,
|
|
209
|
+
OTHER = 300
|
|
210
|
+
}
|
|
211
|
+
|
|
109
212
|
function BehaviorEnumValidator(enumObj: any): (key: string) => any;
|
|
110
213
|
|
|
111
214
|
function BehaviorMapValidator(map: any): (key: string) => any;
|
|
@@ -150,17 +253,78 @@ declare namespace ApplicationInsights {
|
|
|
150
253
|
|
|
151
254
|
const enum eDistributedTracingModes {
|
|
152
255
|
/**
|
|
153
|
-
*
|
|
256
|
+
* Send only the legacy Application Insights correlation headers
|
|
257
|
+
*
|
|
258
|
+
* Headers Sent:
|
|
259
|
+
* - `Request-Id` (Legacy Application Insights header for older Server side SDKs)
|
|
260
|
+
*
|
|
261
|
+
* Config Decimal Value: `0` (Zero)
|
|
154
262
|
*/
|
|
155
263
|
AI = 0,
|
|
156
264
|
/**
|
|
157
|
-
* Send both W3C Trace
|
|
265
|
+
* (Default) Send both W3C Trace parent header and back-compatibility Application Insights headers
|
|
266
|
+
* - `Request-Id`
|
|
267
|
+
* - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
268
|
+
*
|
|
269
|
+
* Config Decimal Value: `1` (One)
|
|
158
270
|
*/
|
|
159
271
|
AI_AND_W3C = 1,
|
|
160
272
|
/**
|
|
161
|
-
* Send W3C Trace
|
|
273
|
+
* Send Only the W3C Trace parent header
|
|
274
|
+
*
|
|
275
|
+
* Headers Sent:
|
|
276
|
+
* - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
277
|
+
*
|
|
278
|
+
* Config Decimal Value: `2` (Two)
|
|
279
|
+
*/
|
|
280
|
+
W3C = 2,
|
|
281
|
+
/**
|
|
282
|
+
* @internal
|
|
283
|
+
* Bitwise mask used to separate the base distributed tracing mode from the additional optional
|
|
284
|
+
* tracing modes.
|
|
285
|
+
* @since 3.4.0
|
|
286
|
+
*/
|
|
287
|
+
_BaseMask = 15,
|
|
288
|
+
/**
|
|
289
|
+
* @internal
|
|
290
|
+
* Enabling this bit will send the W3C Trace State header, it is not intended to be used directly
|
|
291
|
+
* or on its own. The code may assume that if this bit is set, then the W3C Trace Context headers
|
|
292
|
+
* will also be included.
|
|
293
|
+
*
|
|
294
|
+
* Config Decimal Value: `16` (Sixteen in decimal)
|
|
295
|
+
* @since 3.4.0
|
|
296
|
+
*/
|
|
297
|
+
_W3CTraceState = 16,
|
|
298
|
+
/**
|
|
299
|
+
* Send all of the W3C Trace Context headers and the W3C Trace State headers and back-compatibility
|
|
300
|
+
* Application Insights headers.
|
|
301
|
+
*
|
|
302
|
+
* Currently sent headers:
|
|
303
|
+
* - `Request-Id` (Legacy Application Insights header for older Server side SDKs)
|
|
304
|
+
* - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
305
|
+
* - [`tracestate`](https://www.w3.org/TR/trace-context/#tracestate-header)
|
|
306
|
+
*
|
|
307
|
+
* NOTE!: Additional headers may be added as part of a future update should the W3C Trace Context specification be updated
|
|
308
|
+
* to include additional headers.
|
|
309
|
+
*
|
|
310
|
+
* Config Decimal Value: `17` (Seventeen in decimal)
|
|
311
|
+
* @since 3.4.0
|
|
312
|
+
*/
|
|
313
|
+
AI_AND_W3C_TRACE = 17,
|
|
314
|
+
/**
|
|
315
|
+
* Send all of the W3C Trace Context headers and the W3C Trace State headers.
|
|
316
|
+
*
|
|
317
|
+
* Currently sent headers:
|
|
318
|
+
* - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
319
|
+
* - [`tracestate`](https://www.w3.org/TR/trace-context/#tracestate-header)
|
|
320
|
+
*
|
|
321
|
+
* NOTE!: Additional headers may be added as part of a future update should the W3C Trace Context specification be updated
|
|
322
|
+
* to include additional headers.
|
|
323
|
+
*
|
|
324
|
+
* Config Decimal Value: `18` (Eighteen in decimal)
|
|
325
|
+
* @since 3.4.0
|
|
162
326
|
*/
|
|
163
|
-
|
|
327
|
+
W3C_TRACE = 18
|
|
164
328
|
}
|
|
165
329
|
|
|
166
330
|
const enum _eInternalMessageId {
|
|
@@ -293,6 +457,30 @@ declare namespace ApplicationInsights {
|
|
|
293
457
|
|
|
294
458
|
type EnumValue<E = any> = EnumCls<E>;
|
|
295
459
|
|
|
460
|
+
/**
|
|
461
|
+
* Controls how the SDK should look for trace headers (traceparent/tracestate) from the initial page load
|
|
462
|
+
* The values are bitwise OR'd together to allow for multiple values to be set at once.
|
|
463
|
+
* @since 3.4.0
|
|
464
|
+
*/
|
|
465
|
+
const enum eTraceHeadersMode {
|
|
466
|
+
/**
|
|
467
|
+
* Don't look for any trace headers
|
|
468
|
+
*/
|
|
469
|
+
None = 0,
|
|
470
|
+
/**
|
|
471
|
+
* Look for traceparent header/meta tag
|
|
472
|
+
*/
|
|
473
|
+
TraceParent = 1,
|
|
474
|
+
/**
|
|
475
|
+
* Look for tracestate header/meta tag
|
|
476
|
+
*/
|
|
477
|
+
TraceState = 2,
|
|
478
|
+
/**
|
|
479
|
+
* Look for both traceparent and tracestate headers/meta tags
|
|
480
|
+
*/
|
|
481
|
+
All = 3
|
|
482
|
+
}
|
|
483
|
+
|
|
296
484
|
const enum FeatureOptInMode {
|
|
297
485
|
/**
|
|
298
486
|
* not set, completely depends on cdn cfg
|
|
@@ -435,7 +623,7 @@ declare namespace ApplicationInsights {
|
|
|
435
623
|
*/
|
|
436
624
|
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
|
|
437
625
|
/**
|
|
438
|
-
* Gets the current distributed trace context for this instance
|
|
626
|
+
* Gets the current distributed trace active context for this instance
|
|
439
627
|
* @param createNew - Optional flag to create a new instance if one doesn't currently exist, defaults to true
|
|
440
628
|
*/
|
|
441
629
|
getTraceCtx(createNew?: boolean): IDistributedTraceContext | null;
|
|
@@ -484,9 +672,12 @@ declare namespace ApplicationInsights {
|
|
|
484
672
|
*/
|
|
485
673
|
getCfg: () => IConfiguration;
|
|
486
674
|
/**
|
|
487
|
-
* Gets the named extension
|
|
675
|
+
* Gets the named extension configuration
|
|
676
|
+
* @param identifier - The named extension identifier
|
|
677
|
+
* @param defaultValue - The default value(s) to return if no defined config exists
|
|
678
|
+
* @param rootOnly - If true, only the look for the configuration in the top level and not in the "extensionConfig"
|
|
488
679
|
*/
|
|
489
|
-
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T
|
|
680
|
+
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>, rootOnly?: boolean) => T;
|
|
490
681
|
/**
|
|
491
682
|
* Gets the named config from either the named identifier extension or core config if neither exist then the
|
|
492
683
|
* default value is returned
|
|
@@ -1162,7 +1353,7 @@ declare namespace ApplicationInsights {
|
|
|
1162
1353
|
* }
|
|
1163
1354
|
* ```
|
|
1164
1355
|
*
|
|
1165
|
-
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/
|
|
1356
|
+
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/PageUnloadEvents.html).
|
|
1166
1357
|
*/
|
|
1167
1358
|
disablePageUnloadEvents?: string[];
|
|
1168
1359
|
/**
|
|
@@ -1177,7 +1368,7 @@ declare namespace ApplicationInsights {
|
|
|
1177
1368
|
* }
|
|
1178
1369
|
* ```
|
|
1179
1370
|
*
|
|
1180
|
-
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/
|
|
1371
|
+
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/PageUnloadEvents.html).
|
|
1181
1372
|
*/
|
|
1182
1373
|
disablePageShowEvents?: string[];
|
|
1183
1374
|
/**
|
|
@@ -1219,6 +1410,45 @@ declare namespace ApplicationInsights {
|
|
|
1219
1410
|
* @since 3.3.2
|
|
1220
1411
|
*/
|
|
1221
1412
|
expCfg?: IExceptionConfig;
|
|
1413
|
+
/**
|
|
1414
|
+
* [Optional] A flag to enable or disable the use of the field redaction for urls.
|
|
1415
|
+
* @defaultValue true
|
|
1416
|
+
*/
|
|
1417
|
+
redactUrls?: boolean;
|
|
1418
|
+
/**
|
|
1419
|
+
* [Optional] Additional query parameters to redact beyond the default set.
|
|
1420
|
+
* Use this to specify custom parameters that contain sensitive information.
|
|
1421
|
+
* These will be combined with the default parameters that are redacted.
|
|
1422
|
+
* @defaultValue ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"]
|
|
1423
|
+
* @example ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature","auth_token", "api_key", "private_data"]
|
|
1424
|
+
*/
|
|
1425
|
+
redactQueryParams?: string[];
|
|
1426
|
+
/**
|
|
1427
|
+
* [Optional] Controls if the SDK should look for the `traceparent` and/or `tracestate` values from
|
|
1428
|
+
* the service timing headers or meta tags from the initial page load.
|
|
1429
|
+
* @defaultValue eTraceHeadersMode.All
|
|
1430
|
+
*/
|
|
1431
|
+
traceHdrMode?: eTraceHeadersMode;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* Content interface
|
|
1436
|
+
*/
|
|
1437
|
+
interface IContent {
|
|
1438
|
+
/**
|
|
1439
|
+
* Friendly name (Content Name) of the content to be used reporting/visualization purposes
|
|
1440
|
+
*/
|
|
1441
|
+
cN?: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* Unique identifier (friendly names allowed) of the content (Content Id) as designated by the content provider.
|
|
1444
|
+
* The name should be unique per contentSource such that the two make up the compound key and such that the contentId can be
|
|
1445
|
+
* looked up in the contentSource for additional metadata.
|
|
1446
|
+
*/
|
|
1447
|
+
id?: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* User specified custom content properties
|
|
1450
|
+
*/
|
|
1451
|
+
[name: string]: string | number | boolean | string[] | number[] | boolean[] | object | undefined;
|
|
1222
1452
|
}
|
|
1223
1453
|
|
|
1224
1454
|
interface ICookieMgr {
|
|
@@ -1455,8 +1685,13 @@ declare namespace ApplicationInsights {
|
|
|
1455
1685
|
*/
|
|
1456
1686
|
getName(): string;
|
|
1457
1687
|
/**
|
|
1458
|
-
* Sets the current name of the page
|
|
1688
|
+
* Sets the current name of the page, also updates the name for any parent context.
|
|
1689
|
+
* This is used to identify the page in the telemetry data.
|
|
1690
|
+
* @remarks This function updates the current and ALL parent contexts with the new name,
|
|
1691
|
+
* to just update the name of the current context, use the `pageName` property.
|
|
1459
1692
|
* @param pageName - The name of the page
|
|
1693
|
+
* @deprecated Use the `pageName` property to avoid the side effect of changing the page name of all
|
|
1694
|
+
* parent contexts.
|
|
1460
1695
|
*/
|
|
1461
1696
|
setName(pageName: string): void;
|
|
1462
1697
|
/**
|
|
@@ -1469,6 +1704,12 @@ declare namespace ApplicationInsights {
|
|
|
1469
1704
|
* Set the unique identifier for a trace. All requests / spans from the same trace share the same traceId.
|
|
1470
1705
|
* Must be conform to the W3C TraceContext specification, in a hex representation of 16-byte array.
|
|
1471
1706
|
* A.k.a. trace-id, TraceID or Distributed TraceID https://www.w3.org/TR/trace-context/#trace-id
|
|
1707
|
+
*
|
|
1708
|
+
* @remarks Sets the traceId for the current context AND all parent contexts, if you want to set the traceId
|
|
1709
|
+
* for the current context only, use the `traceId` property.
|
|
1710
|
+
* @param newValue - The traceId to set
|
|
1711
|
+
* @deprecated Use the `traceId` property to avoid the side effect of changing the traceId of all
|
|
1712
|
+
* parent contexts.
|
|
1472
1713
|
*/
|
|
1473
1714
|
setTraceId(newValue: string): void;
|
|
1474
1715
|
/**
|
|
@@ -1480,6 +1721,12 @@ declare namespace ApplicationInsights {
|
|
|
1480
1721
|
* Self-generated 8-bytes identifier of the incoming request. Must be a hex representation of 8-byte array.
|
|
1481
1722
|
* Also know as the parentId, used to link requests together
|
|
1482
1723
|
* https://www.w3.org/TR/trace-context/#parent-id
|
|
1724
|
+
*
|
|
1725
|
+
* @remarks Sets the spanId for the current context AND all parent contexts, if you want to set the spanId for
|
|
1726
|
+
* the current context only, use the `spanId` property.
|
|
1727
|
+
* @param newValue - The spanId to set
|
|
1728
|
+
* @deprecated Use the `spanId` property to avoid the side effect of changing the spanId of all
|
|
1729
|
+
* parent contexts.
|
|
1483
1730
|
*/
|
|
1484
1731
|
setSpanId(newValue: string): void;
|
|
1485
1732
|
/**
|
|
@@ -1488,9 +1735,80 @@ declare namespace ApplicationInsights {
|
|
|
1488
1735
|
getTraceFlags(): number | undefined;
|
|
1489
1736
|
/**
|
|
1490
1737
|
* https://www.w3.org/TR/trace-context/#trace-flags
|
|
1738
|
+
* @remarks Sets the trace flags for the current context and ALL parent contexts, if you want to set the trace
|
|
1739
|
+
* flags for the current context only, use the `traceFlags` property.
|
|
1491
1740
|
* @param newValue - An integer representation of the W3C TraceContext trace-flags.
|
|
1741
|
+
* @deprecated Use the `traceFlags` property to avoid the side effect of changing the traceFlags of all
|
|
1742
|
+
* parent contexts.
|
|
1492
1743
|
*/
|
|
1493
1744
|
setTraceFlags(newValue?: number): void;
|
|
1745
|
+
/**
|
|
1746
|
+
* Returns the current name of the page
|
|
1747
|
+
* @remarks This function updates the current context only, to update the name of the current and ALL parent contexts,
|
|
1748
|
+
* use the `setName` method.
|
|
1749
|
+
* @default undefined
|
|
1750
|
+
* @since 3.4.0
|
|
1751
|
+
*/
|
|
1752
|
+
pageName: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* The current ID of the trace that this span belongs to. It is worldwide unique
|
|
1755
|
+
* with practically sufficient probability by being made as 16 randomly
|
|
1756
|
+
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
|
|
1757
|
+
* 128 bits.
|
|
1758
|
+
* @remarks If you update this value, it will only update for the current context, not the parent context,
|
|
1759
|
+
* if you need to update the current and ALL parent contexts, use the `setTraceId` method.
|
|
1760
|
+
* @since 3.4.0
|
|
1761
|
+
*/
|
|
1762
|
+
traceId: string;
|
|
1763
|
+
/**
|
|
1764
|
+
* The ID of the Span. It is globally unique with practically sufficient
|
|
1765
|
+
* probability by being made as 8 randomly generated bytes, encoded as a 16
|
|
1766
|
+
* lowercase hex characters corresponding to 64 bits.
|
|
1767
|
+
* If you update this value, it will only update for the current context, not the parent context.
|
|
1768
|
+
* @remarks If you update this value, it will only update for the current context, not the parent context,
|
|
1769
|
+
* if you need to update the current and ALL parent contexts, use the `setSpanId` method.
|
|
1770
|
+
* @since 3.4.0
|
|
1771
|
+
*/
|
|
1772
|
+
spanId: string;
|
|
1773
|
+
/**
|
|
1774
|
+
* Returns true if the current context was initialized (propagated) from a remote parent.
|
|
1775
|
+
* @since 3.4.0
|
|
1776
|
+
* @default false
|
|
1777
|
+
* @returns True if the context was propagated from a remote parent
|
|
1778
|
+
*/
|
|
1779
|
+
readonly isRemote: boolean;
|
|
1780
|
+
/**
|
|
1781
|
+
* Trace flags to propagate.
|
|
1782
|
+
*
|
|
1783
|
+
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
|
|
1784
|
+
* sampled or not. When set, the least significant bit documents that the
|
|
1785
|
+
* caller may have recorded trace data. A caller who does not record trace
|
|
1786
|
+
* data out-of-band leaves this flag unset.
|
|
1787
|
+
*
|
|
1788
|
+
* see {@link eW3CTraceFlags} for valid flag values.
|
|
1789
|
+
*
|
|
1790
|
+
* @remarks If you update this value, it will only update for the current context, not the parent context,
|
|
1791
|
+
* if you need to update the current and ALL parent contexts, use the `setTraceFlags` method.
|
|
1792
|
+
* @since 3.4.0
|
|
1793
|
+
*/
|
|
1794
|
+
traceFlags?: number;
|
|
1795
|
+
/**
|
|
1796
|
+
* Returns the current trace state which will be used to propgate context across different services.
|
|
1797
|
+
* Updating (adding / removing keys) of the trace state will modify the current context.
|
|
1798
|
+
* @remarks Unlike the OpenTelemetry {@link TraceState}, this value is a mutable object, so you can
|
|
1799
|
+
* modify it directly you do not need to reassign the new value to this property.
|
|
1800
|
+
* @since 3.4.0
|
|
1801
|
+
*/
|
|
1802
|
+
readonly traceState: IW3cTraceState;
|
|
1803
|
+
/**
|
|
1804
|
+
* Provides access to the parent context of the current context.
|
|
1805
|
+
* @remarks This is a read-only property, you cannot modify the parent context directly, you can only
|
|
1806
|
+
* modify the current context. If you need to modify the parent context, you need to do it through the
|
|
1807
|
+
* current context using the `setTraceId`, `setSpanId`, `setTraceFlags` and `setName` methods.
|
|
1808
|
+
* @default null
|
|
1809
|
+
* @since 3.4.0
|
|
1810
|
+
*/
|
|
1811
|
+
readonly parentCtx?: IDistributedTraceContext | null;
|
|
1494
1812
|
}
|
|
1495
1813
|
|
|
1496
1814
|
interface IEventTelemetry extends IPartC {
|
|
@@ -1795,6 +2113,63 @@ declare namespace ApplicationInsights {
|
|
|
1795
2113
|
|
|
1796
2114
|
type _InternalMessageId = number | _eInternalMessageId;
|
|
1797
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* Override values interface
|
|
2118
|
+
*/
|
|
2119
|
+
interface IOverrideValues {
|
|
2120
|
+
/**
|
|
2121
|
+
* One of the awa.behavior values.
|
|
2122
|
+
*/
|
|
2123
|
+
behavior?: string | number;
|
|
2124
|
+
/**
|
|
2125
|
+
* Page name
|
|
2126
|
+
*/
|
|
2127
|
+
pageName?: string;
|
|
2128
|
+
/**
|
|
2129
|
+
* Page type
|
|
2130
|
+
*/
|
|
2131
|
+
pageType?: string;
|
|
2132
|
+
/**
|
|
2133
|
+
* KVP to be added to the page tags collected
|
|
2134
|
+
*/
|
|
2135
|
+
pageTags?: any;
|
|
2136
|
+
/**
|
|
2137
|
+
* Indicates if the event was fired automatically
|
|
2138
|
+
*/
|
|
2139
|
+
isAuto?: boolean;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
interface IPageActionOverrideValues extends IOverrideValues {
|
|
2143
|
+
/**
|
|
2144
|
+
* Uri of the referrer page
|
|
2145
|
+
*/
|
|
2146
|
+
refUri?: string;
|
|
2147
|
+
/**
|
|
2148
|
+
* One of the awa.actionType values
|
|
2149
|
+
*/
|
|
2150
|
+
actionType?: string;
|
|
2151
|
+
/**
|
|
2152
|
+
* Target uri for PageAction events
|
|
2153
|
+
*/
|
|
2154
|
+
targetUri?: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* Click coordinates relative to the top left of the fully rendered content area in the browser
|
|
2157
|
+
*/
|
|
2158
|
+
clickCoordinateX?: number;
|
|
2159
|
+
/**
|
|
2160
|
+
* Click coordinates relative to the top left of the fully rendered content area in the browser
|
|
2161
|
+
*/
|
|
2162
|
+
clickCoordinateY?: number;
|
|
2163
|
+
/**
|
|
2164
|
+
* KVP of the content
|
|
2165
|
+
*/
|
|
2166
|
+
content?: any;
|
|
2167
|
+
/**
|
|
2168
|
+
* KVPs to be added to the content tags collected on a Page Action event; extends the items in the Content blob in Page Action events
|
|
2169
|
+
*/
|
|
2170
|
+
contentTags?: any;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
1798
2173
|
/**
|
|
1799
2174
|
* Page Action event
|
|
1800
2175
|
*/
|
|
@@ -2363,9 +2738,10 @@ declare namespace ApplicationInsights {
|
|
|
2363
2738
|
*/
|
|
2364
2739
|
interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
|
|
2365
2740
|
/**
|
|
2366
|
-
* Set next extension for telemetry processing, this is
|
|
2741
|
+
* Set next extension for telemetry processing, this is now optional as plugins should use the
|
|
2367
2742
|
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
2368
2743
|
* now for backward compatibility only.
|
|
2744
|
+
* @deprecated - Use processNext() function of the passed IProcessTelemetryContext instead
|
|
2369
2745
|
*/
|
|
2370
2746
|
setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
2371
2747
|
/**
|
|
@@ -2665,6 +3041,76 @@ declare namespace ApplicationInsights {
|
|
|
2665
3041
|
contentName?: (element?: any, useDefaultContentName?: boolean) => string;
|
|
2666
3042
|
}
|
|
2667
3043
|
|
|
3044
|
+
/**
|
|
3045
|
+
* Represents a mutable [W3C trace state list](https://www.w3.org/TR/trace-context/#tracestate-header), this is a
|
|
3046
|
+
* list of key/value pairs that are used to pass trace state information between different tracing systems. The
|
|
3047
|
+
* list is ordered and the order is important as it determines the processing order.
|
|
3048
|
+
*
|
|
3049
|
+
* Importantly instances of this type are mutable, change made to an instance via {@link IW3cTraceState.set} or
|
|
3050
|
+
* {@link IW3cTraceState.del} will be reflected on the instance and any child instances that use it as a parent.
|
|
3051
|
+
* However, any parent instance associated with an instance will not be modified by operations on that particular
|
|
3052
|
+
* instance.
|
|
3053
|
+
*
|
|
3054
|
+
* @since 3.4.0
|
|
3055
|
+
*/
|
|
3056
|
+
interface IW3cTraceState {
|
|
3057
|
+
/**
|
|
3058
|
+
* Returns a readonly array of the current keys associated with the trace state, keys are returned in the
|
|
3059
|
+
* required processing order and if this instance has a parent the keys from the parent will be included
|
|
3060
|
+
* unless they have been removed (deleted) from the child instance.
|
|
3061
|
+
* Once created any modifications to the parent will also be reflected in the child, this is different from
|
|
3062
|
+
* the OpenTelemetry implementation which creates a new instance for each call.
|
|
3063
|
+
* @returns A readonly array of the current keys associated with the trace state
|
|
3064
|
+
*/
|
|
3065
|
+
readonly keys: string[];
|
|
3066
|
+
/**
|
|
3067
|
+
* Check if the trace state list is empty, meaning it has no keys or values.
|
|
3068
|
+
* This exists to allow for quick checks without needing to create a new array of keys.
|
|
3069
|
+
* @since 3.4.0
|
|
3070
|
+
* @returns true if the trace state list is empty, false otherwise
|
|
3071
|
+
*/
|
|
3072
|
+
readonly isEmpty: boolean;
|
|
3073
|
+
/**
|
|
3074
|
+
* Get the value for the specified key that is associated with this instance, either directly or from the parent.
|
|
3075
|
+
* @param key - The key to lookup
|
|
3076
|
+
* @returns The value for the key, or undefined if not found
|
|
3077
|
+
*/
|
|
3078
|
+
get(key: string): string | undefined;
|
|
3079
|
+
/**
|
|
3080
|
+
* Set the value for the specified key for this instance, returning its new location within the list.
|
|
3081
|
+
* - 0 is the front of the list
|
|
3082
|
+
* - -1 not set because the key/value pair is invalid
|
|
3083
|
+
* If the key already exists it will be removed from its current location and added to the front of the list. And
|
|
3084
|
+
* if the key was in the parent this will override the value inherited from the parent, more importantly it will
|
|
3085
|
+
* not modify the parent value.
|
|
3086
|
+
* @param key - The key to set
|
|
3087
|
+
* @param value - The value to set
|
|
3088
|
+
* @returns 0 if successful, -1 if not
|
|
3089
|
+
*/
|
|
3090
|
+
set(key: string, value: string): number;
|
|
3091
|
+
/**
|
|
3092
|
+
* Delete the specified key from this instance, if the key was in the parent it will be removed (hidden) from
|
|
3093
|
+
* this instance but will still be available directly from the parent.
|
|
3094
|
+
* @param key - The key to delete
|
|
3095
|
+
*/
|
|
3096
|
+
del(key: string): void;
|
|
3097
|
+
/**
|
|
3098
|
+
* Format the trace state list into a strings where each string can be used as a header value.
|
|
3099
|
+
* This will return an empty array if the trace state list is empty.
|
|
3100
|
+
* @param maxHeaders - The maximum number of entries to include in the output, once the limit is reached no more entries will be included
|
|
3101
|
+
* @param maxKeys - The maximum number of keys to include in the output, once the limit is reached no more keys will be included
|
|
3102
|
+
* @param maxLen - The maximum length of each header value, once the limit is reached a new header value will be created
|
|
3103
|
+
* @returns An array of strings that can be used for the header values, if the trace state list is empty an empty array will be returned
|
|
3104
|
+
*/
|
|
3105
|
+
hdrs(maxHeaders?: number, maxKeys?: number, maxLen?: number): string[];
|
|
3106
|
+
/**
|
|
3107
|
+
* Create a new instance of IW3cTraceState which is a child of this instance, meaning it will inherit the keys
|
|
3108
|
+
* and values from this instance but any changes made to the child will not affect this instance.
|
|
3109
|
+
* @returns A new instance of IW3cTraceState which is a child of this instance
|
|
3110
|
+
*/
|
|
3111
|
+
child(): IW3cTraceState;
|
|
3112
|
+
}
|
|
3113
|
+
|
|
2668
3114
|
interface IWatchDetails<T = IConfiguration> {
|
|
2669
3115
|
/**
|
|
2670
3116
|
* The current config object
|