@microsoft/applicationinsights-teechannel-js 3.4.0-nightlybeta3.2505-36 → 3.4.0-nightlybeta3.2507-23

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.
Files changed (48) hide show
  1. package/README.md +3 -3
  2. package/browser/es5/{applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.cjs.js → applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.cjs.js} +18 -19
  3. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.cjs.js.map +1 -0
  4. package/browser/es5/{applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.cjs.min.js → applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.cjs.min.js} +3 -3
  5. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.cjs.min.js.map +1 -0
  6. package/browser/es5/{applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.gbl.js → applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.gbl.js} +20 -21
  7. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.gbl.js.map +1 -0
  8. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.gbl.min.js +6 -0
  9. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.gbl.min.js.map +1 -0
  10. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.integrity.json +66 -0
  11. package/browser/es5/{applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.js → applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.js} +20 -21
  12. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.js.map +1 -0
  13. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.min.js +6 -0
  14. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2507-23.min.js.map +1 -0
  15. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js +17 -18
  16. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js.map +1 -1
  17. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js +2 -2
  18. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js.map +1 -1
  19. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js +19 -20
  20. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js.map +1 -1
  21. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js +2 -2
  22. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js.map +1 -1
  23. package/browser/es5/applicationinsights-teechannel-js.3.integrity.json +25 -25
  24. package/browser/es5/applicationinsights-teechannel-js.3.js +19 -20
  25. package/browser/es5/applicationinsights-teechannel-js.3.js.map +1 -1
  26. package/browser/es5/applicationinsights-teechannel-js.3.min.js +2 -2
  27. package/browser/es5/applicationinsights-teechannel-js.3.min.js.map +1 -1
  28. package/dist/es5/applicationinsights-teechannel-js.js +17 -18
  29. package/dist/es5/applicationinsights-teechannel-js.js.map +1 -1
  30. package/dist/es5/applicationinsights-teechannel-js.min.js +2 -2
  31. package/dist/es5/applicationinsights-teechannel-js.min.js.map +1 -1
  32. package/dist-es5/ChannelController.js +1 -1
  33. package/dist-es5/Interfaces/ITeeChannelConfig.js +1 -1
  34. package/dist-es5/TeeChannel.js +1 -1
  35. package/dist-es5/__DynamicConstants.js +1 -1
  36. package/dist-es5/applicationinsights-teechannel-js.js +1 -1
  37. package/package.json +3 -3
  38. package/types/applicationinsights-teechannel-js.d.ts +1 -1
  39. package/types/applicationinsights-teechannel-js.namespaced.d.ts +283 -14
  40. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.cjs.js.map +0 -1
  41. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.cjs.min.js.map +0 -1
  42. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.gbl.js.map +0 -1
  43. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.gbl.min.js +0 -6
  44. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.gbl.min.js.map +0 -1
  45. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.integrity.json +0 -66
  46. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.js.map +0 -1
  47. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.min.js +0 -6
  48. package/browser/es5/applicationinsights-teechannel-js.3.4.0-nightlybeta3.2505-36.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2507-23
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2507-23
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2507-23
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2507-23
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.4.0-nightlybeta3.2507-23
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-teechannel-js",
3
- "version": "3.4.0-nightlybeta3.2505-36",
3
+ "version": "3.4.0-nightlybeta3.2507-23",
4
4
  "description": "Microsoft Application Insights JavaScript SDK Tee Channel",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -58,8 +58,8 @@
58
58
  "dependencies": {
59
59
  "@microsoft/dynamicproto-js": "^2.0.3",
60
60
  "@microsoft/applicationinsights-shims": "3.0.1",
61
- "@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.2505-36",
62
- "@microsoft/applicationinsights-common": "3.4.0-nightlybeta3.2505-36",
61
+ "@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.2507-23",
62
+ "@microsoft/applicationinsights-common": "3.4.0-nightlybeta3.2507-23",
63
63
  "@nevware21/ts-utils": ">= 0.11.8 < 2.x",
64
64
  "@nevware21/ts-async": ">= 0.5.4 < 2.x"
65
65
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Microsoft Application Insights JavaScript SDK Tee Channel, 3.4.0-nightlybeta3.2507-23
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Tee Channel, 3.4.0-nightlybeta3.2505-36
2
+ * Microsoft Application Insights JavaScript SDK Tee Channel, 3.4.0-nightlybeta3.2507-23
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: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
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.
@@ -129,17 +132,78 @@ declare namespace ApplicationInsights {
129
132
 
130
133
  const enum eDistributedTracingModes {
131
134
  /**
132
- * (Default) Send Application Insights correlation headers
135
+ * Send only the legacy Application Insights correlation headers
136
+ *
137
+ * Headers Sent:
138
+ * - `Request-Id` (Legacy Application Insights header for older Server side SDKs)
139
+ *
140
+ * Config Decimal Value: `0` (Zero)
133
141
  */
134
142
  AI = 0,
135
143
  /**
136
- * Send both W3C Trace Context headers and back-compatibility Application Insights headers
144
+ * (Default) Send both W3C Trace parent header and back-compatibility Application Insights headers
145
+ * - `Request-Id`
146
+ * - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
147
+ *
148
+ * Config Decimal Value: `1` (One)
137
149
  */
138
150
  AI_AND_W3C = 1,
139
151
  /**
140
- * Send W3C Trace Context headers
152
+ * Send Only the W3C Trace parent header
153
+ *
154
+ * Headers Sent:
155
+ * - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
156
+ *
157
+ * Config Decimal Value: `2` (Two)
158
+ */
159
+ W3C = 2,
160
+ /**
161
+ * @internal
162
+ * Bitwise mask used to separate the base distributed tracing mode from the additional optional
163
+ * tracing modes.
164
+ * @since 3.4.0
165
+ */
166
+ _BaseMask = 15,
167
+ /**
168
+ * @internal
169
+ * Enabling this bit will send the W3C Trace State header, it is not intended to be used directly
170
+ * or on its own. The code may assume that if this bit is set, then the W3C Trace Context headers
171
+ * will also be included.
172
+ *
173
+ * Config Decimal Value: `16` (Sixteen in decimal)
174
+ * @since 3.4.0
141
175
  */
142
- W3C = 2
176
+ _W3CTraceState = 16,
177
+ /**
178
+ * Send all of the W3C Trace Context headers and the W3C Trace State headers and back-compatibility
179
+ * Application Insights headers.
180
+ *
181
+ * Currently sent headers:
182
+ * - `Request-Id` (Legacy Application Insights header for older Server side SDKs)
183
+ * - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
184
+ * - [`tracestate`](https://www.w3.org/TR/trace-context/#tracestate-header)
185
+ *
186
+ * NOTE!: Additional headers may be added as part of a future update should the W3C Trace Context specification be updated
187
+ * to include additional headers.
188
+ *
189
+ * Config Decimal Value: `17` (Seventeen in decimal)
190
+ * @since 3.4.0
191
+ */
192
+ AI_AND_W3C_TRACE = 17,
193
+ /**
194
+ * Send all of the W3C Trace Context headers and the W3C Trace State headers.
195
+ *
196
+ * Currently sent headers:
197
+ * - [`traceparent`](https://www.w3.org/TR/trace-context/#traceparent-header)
198
+ * - [`tracestate`](https://www.w3.org/TR/trace-context/#tracestate-header)
199
+ *
200
+ * NOTE!: Additional headers may be added as part of a future update should the W3C Trace Context specification be updated
201
+ * to include additional headers.
202
+ *
203
+ * Config Decimal Value: `18` (Eighteen in decimal)
204
+ * @since 3.4.0
205
+ */
206
+ W3C_TRACE = 18
143
207
  }
144
208
 
145
209
  const enum _eInternalMessageId {
@@ -272,6 +336,30 @@ declare namespace ApplicationInsights {
272
336
 
273
337
  type EnumValue<E = any> = EnumCls<E>;
274
338
 
339
+ /**
340
+ * Controls how the SDK should look for trace headers (traceparent/tracestate) from the initial page load
341
+ * The values are bitwise OR'd together to allow for multiple values to be set at once.
342
+ * @since 3.4.0
343
+ */
344
+ const enum eTraceHeadersMode {
345
+ /**
346
+ * Don't look for any trace headers
347
+ */
348
+ None = 0,
349
+ /**
350
+ * Look for traceparent header/meta tag
351
+ */
352
+ TraceParent = 1,
353
+ /**
354
+ * Look for tracestate header/meta tag
355
+ */
356
+ TraceState = 2,
357
+ /**
358
+ * Look for both traceparent and tracestate headers/meta tags
359
+ */
360
+ All = 3
361
+ }
362
+
275
363
  const enum FeatureOptInMode {
276
364
  /**
277
365
  * not set, completely depends on cdn cfg
@@ -414,7 +502,7 @@ declare namespace ApplicationInsights {
414
502
  */
415
503
  flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
416
504
  /**
417
- * Gets the current distributed trace context for this instance if available
505
+ * Gets the current distributed trace active context for this instance
418
506
  * @param createNew - Optional flag to create a new instance if one doesn't currently exist, defaults to true
419
507
  */
420
508
  getTraceCtx(createNew?: boolean): IDistributedTraceContext | null;
@@ -463,9 +551,12 @@ declare namespace ApplicationInsights {
463
551
  */
464
552
  getCfg: () => IConfiguration;
465
553
  /**
466
- * Gets the named extension config
554
+ * Gets the named extension configuration
555
+ * @param identifier - The named extension identifier
556
+ * @param defaultValue - The default value(s) to return if no defined config exists
557
+ * @param rootOnly - If true, only the look for the configuration in the top level and not in the "extensionConfig"
467
558
  */
468
- getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>) => T;
559
+ getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>, rootOnly?: boolean) => T;
469
560
  /**
470
561
  * Gets the named config from either the named identifier extension or core config if neither exist then the
471
562
  * default value is returned
@@ -1094,7 +1185,7 @@ declare namespace ApplicationInsights {
1094
1185
  * }
1095
1186
  * ```
1096
1187
  *
1097
- * For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/docs/PageUnloadEvents.html).
1188
+ * For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/PageUnloadEvents.html).
1098
1189
  */
1099
1190
  disablePageUnloadEvents?: string[];
1100
1191
  /**
@@ -1109,7 +1200,7 @@ declare namespace ApplicationInsights {
1109
1200
  * }
1110
1201
  * ```
1111
1202
  *
1112
- * For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/docs/PageUnloadEvents.html).
1203
+ * For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/PageUnloadEvents.html).
1113
1204
  */
1114
1205
  disablePageShowEvents?: string[];
1115
1206
  /**
@@ -1151,6 +1242,25 @@ declare namespace ApplicationInsights {
1151
1242
  * @since 3.3.2
1152
1243
  */
1153
1244
  expCfg?: IExceptionConfig;
1245
+ /**
1246
+ * [Optional] A flag to enable or disable the use of the field redaction for urls.
1247
+ * @defaultValue true
1248
+ */
1249
+ redactUrls?: boolean;
1250
+ /**
1251
+ * [Optional] Additional query parameters to redact beyond the default set.
1252
+ * Use this to specify custom parameters that contain sensitive information.
1253
+ * These will be combined with the default parameters that are redacted.
1254
+ * @defaultValue ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"]
1255
+ * @example ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature","auth_token", "api_key", "private_data"]
1256
+ */
1257
+ redactQueryParams?: string[];
1258
+ /**
1259
+ * [Optional] Controls if the SDK should look for the `traceparent` and/or `tracestate` values from
1260
+ * the service timing headers or meta tags from the initial page load.
1261
+ * @defaultValue eTraceHeadersMode.All
1262
+ */
1263
+ traceHdrMode?: eTraceHeadersMode;
1154
1264
  }
1155
1265
 
1156
1266
  interface ICookieMgr {
@@ -1331,8 +1441,13 @@ declare namespace ApplicationInsights {
1331
1441
  */
1332
1442
  getName(): string;
1333
1443
  /**
1334
- * Sets the current name of the page
1444
+ * Sets the current name of the page, also updates the name for any parent context.
1445
+ * This is used to identify the page in the telemetry data.
1446
+ * @remarks This function updates the current and ALL parent contexts with the new name,
1447
+ * to just update the name of the current context, use the `pageName` property.
1335
1448
  * @param pageName - The name of the page
1449
+ * @deprecated Use the `pageName` property to avoid the side effect of changing the page name of all
1450
+ * parent contexts.
1336
1451
  */
1337
1452
  setName(pageName: string): void;
1338
1453
  /**
@@ -1345,6 +1460,12 @@ declare namespace ApplicationInsights {
1345
1460
  * Set the unique identifier for a trace. All requests / spans from the same trace share the same traceId.
1346
1461
  * Must be conform to the W3C TraceContext specification, in a hex representation of 16-byte array.
1347
1462
  * A.k.a. trace-id, TraceID or Distributed TraceID https://www.w3.org/TR/trace-context/#trace-id
1463
+ *
1464
+ * @remarks Sets the traceId for the current context AND all parent contexts, if you want to set the traceId
1465
+ * for the current context only, use the `traceId` property.
1466
+ * @param newValue - The traceId to set
1467
+ * @deprecated Use the `traceId` property to avoid the side effect of changing the traceId of all
1468
+ * parent contexts.
1348
1469
  */
1349
1470
  setTraceId(newValue: string): void;
1350
1471
  /**
@@ -1356,6 +1477,12 @@ declare namespace ApplicationInsights {
1356
1477
  * Self-generated 8-bytes identifier of the incoming request. Must be a hex representation of 8-byte array.
1357
1478
  * Also know as the parentId, used to link requests together
1358
1479
  * https://www.w3.org/TR/trace-context/#parent-id
1480
+ *
1481
+ * @remarks Sets the spanId for the current context AND all parent contexts, if you want to set the spanId for
1482
+ * the current context only, use the `spanId` property.
1483
+ * @param newValue - The spanId to set
1484
+ * @deprecated Use the `spanId` property to avoid the side effect of changing the spanId of all
1485
+ * parent contexts.
1359
1486
  */
1360
1487
  setSpanId(newValue: string): void;
1361
1488
  /**
@@ -1364,9 +1491,80 @@ declare namespace ApplicationInsights {
1364
1491
  getTraceFlags(): number | undefined;
1365
1492
  /**
1366
1493
  * https://www.w3.org/TR/trace-context/#trace-flags
1494
+ * @remarks Sets the trace flags for the current context and ALL parent contexts, if you want to set the trace
1495
+ * flags for the current context only, use the `traceFlags` property.
1367
1496
  * @param newValue - An integer representation of the W3C TraceContext trace-flags.
1497
+ * @deprecated Use the `traceFlags` property to avoid the side effect of changing the traceFlags of all
1498
+ * parent contexts.
1368
1499
  */
1369
1500
  setTraceFlags(newValue?: number): void;
1501
+ /**
1502
+ * Returns the current name of the page
1503
+ * @remarks This function updates the current context only, to update the name of the current and ALL parent contexts,
1504
+ * use the `setName` method.
1505
+ * @default undefined
1506
+ * @since 3.4.0
1507
+ */
1508
+ pageName: string;
1509
+ /**
1510
+ * The current ID of the trace that this span belongs to. It is worldwide unique
1511
+ * with practically sufficient probability by being made as 16 randomly
1512
+ * generated bytes, encoded as a 32 lowercase hex characters corresponding to
1513
+ * 128 bits.
1514
+ * @remarks If you update this value, it will only update for the current context, not the parent context,
1515
+ * if you need to update the current and ALL parent contexts, use the `setTraceId` method.
1516
+ * @since 3.4.0
1517
+ */
1518
+ traceId: string;
1519
+ /**
1520
+ * The ID of the Span. It is globally unique with practically sufficient
1521
+ * probability by being made as 8 randomly generated bytes, encoded as a 16
1522
+ * lowercase hex characters corresponding to 64 bits.
1523
+ * If you update this value, it will only update for the current context, not the parent context.
1524
+ * @remarks If you update this value, it will only update for the current context, not the parent context,
1525
+ * if you need to update the current and ALL parent contexts, use the `setSpanId` method.
1526
+ * @since 3.4.0
1527
+ */
1528
+ spanId: string;
1529
+ /**
1530
+ * Returns true if the current context was initialized (propagated) from a remote parent.
1531
+ * @since 3.4.0
1532
+ * @default false
1533
+ * @returns True if the context was propagated from a remote parent
1534
+ */
1535
+ readonly isRemote: boolean;
1536
+ /**
1537
+ * Trace flags to propagate.
1538
+ *
1539
+ * It is represented as 1 byte (bitmap). Bit to represent whether trace is
1540
+ * sampled or not. When set, the least significant bit documents that the
1541
+ * caller may have recorded trace data. A caller who does not record trace
1542
+ * data out-of-band leaves this flag unset.
1543
+ *
1544
+ * see {@link eW3CTraceFlags} for valid flag values.
1545
+ *
1546
+ * @remarks If you update this value, it will only update for the current context, not the parent context,
1547
+ * if you need to update the current and ALL parent contexts, use the `setTraceFlags` method.
1548
+ * @since 3.4.0
1549
+ */
1550
+ traceFlags?: number;
1551
+ /**
1552
+ * Returns the current trace state which will be used to propgate context across different services.
1553
+ * Updating (adding / removing keys) of the trace state will modify the current context.
1554
+ * @remarks Unlike the OpenTelemetry {@link TraceState}, this value is a mutable object, so you can
1555
+ * modify it directly you do not need to reassign the new value to this property.
1556
+ * @since 3.4.0
1557
+ */
1558
+ readonly traceState: IW3cTraceState;
1559
+ /**
1560
+ * Provides access to the parent context of the current context.
1561
+ * @remarks This is a read-only property, you cannot modify the parent context directly, you can only
1562
+ * modify the current context. If you need to modify the parent context, you need to do it through the
1563
+ * current context using the `setTraceId`, `setSpanId`, `setTraceFlags` and `setName` methods.
1564
+ * @default null
1565
+ * @since 3.4.0
1566
+ */
1567
+ readonly parentCtx?: IDistributedTraceContext | null;
1370
1568
  }
1371
1569
 
1372
1570
  /**
@@ -2153,9 +2351,10 @@ declare namespace ApplicationInsights {
2153
2351
  */
2154
2352
  interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
2155
2353
  /**
2156
- * Set next extension for telemetry processing, this is not optional as plugins should use the
2354
+ * Set next extension for telemetry processing, this is now optional as plugins should use the
2157
2355
  * processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
2158
2356
  * now for backward compatibility only.
2357
+ * @deprecated - Use processNext() function of the passed IProcessTelemetryContext instead
2159
2358
  */
2160
2359
  setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
2161
2360
  /**
@@ -2437,6 +2636,76 @@ declare namespace ApplicationInsights {
2437
2636
  run: (logger?: IDiagnosticLogger) => void;
2438
2637
  }
2439
2638
 
2639
+ /**
2640
+ * Represents a mutable [W3C trace state list](https://www.w3.org/TR/trace-context/#tracestate-header), this is a
2641
+ * list of key/value pairs that are used to pass trace state information between different tracing systems. The
2642
+ * list is ordered and the order is important as it determines the processing order.
2643
+ *
2644
+ * Importantly instances of this type are mutable, change made to an instance via {@link IW3cTraceState.set} or
2645
+ * {@link IW3cTraceState.del} will be reflected on the instance and any child instances that use it as a parent.
2646
+ * However, any parent instance associated with an instance will not be modified by operations on that particular
2647
+ * instance.
2648
+ *
2649
+ * @since 3.4.0
2650
+ */
2651
+ interface IW3cTraceState {
2652
+ /**
2653
+ * Returns a readonly array of the current keys associated with the trace state, keys are returned in the
2654
+ * required processing order and if this instance has a parent the keys from the parent will be included
2655
+ * unless they have been removed (deleted) from the child instance.
2656
+ * Once created any modifications to the parent will also be reflected in the child, this is different from
2657
+ * the OpenTelemetry implementation which creates a new instance for each call.
2658
+ * @returns A readonly array of the current keys associated with the trace state
2659
+ */
2660
+ readonly keys: string[];
2661
+ /**
2662
+ * Check if the trace state list is empty, meaning it has no keys or values.
2663
+ * This exists to allow for quick checks without needing to create a new array of keys.
2664
+ * @since 3.4.0
2665
+ * @returns true if the trace state list is empty, false otherwise
2666
+ */
2667
+ readonly isEmpty: boolean;
2668
+ /**
2669
+ * Get the value for the specified key that is associated with this instance, either directly or from the parent.
2670
+ * @param key - The key to lookup
2671
+ * @returns The value for the key, or undefined if not found
2672
+ */
2673
+ get(key: string): string | undefined;
2674
+ /**
2675
+ * Set the value for the specified key for this instance, returning its new location within the list.
2676
+ * - 0 is the front of the list
2677
+ * - -1 not set because the key/value pair is invalid
2678
+ * If the key already exists it will be removed from its current location and added to the front of the list. And
2679
+ * if the key was in the parent this will override the value inherited from the parent, more importantly it will
2680
+ * not modify the parent value.
2681
+ * @param key - The key to set
2682
+ * @param value - The value to set
2683
+ * @returns 0 if successful, -1 if not
2684
+ */
2685
+ set(key: string, value: string): number;
2686
+ /**
2687
+ * Delete the specified key from this instance, if the key was in the parent it will be removed (hidden) from
2688
+ * this instance but will still be available directly from the parent.
2689
+ * @param key - The key to delete
2690
+ */
2691
+ del(key: string): void;
2692
+ /**
2693
+ * Format the trace state list into a strings where each string can be used as a header value.
2694
+ * This will return an empty array if the trace state list is empty.
2695
+ * @param maxHeaders - The maximum number of entries to include in the output, once the limit is reached no more entries will be included
2696
+ * @param maxKeys - The maximum number of keys to include in the output, once the limit is reached no more keys will be included
2697
+ * @param maxLen - The maximum length of each header value, once the limit is reached a new header value will be created
2698
+ * @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
2699
+ */
2700
+ hdrs(maxHeaders?: number, maxKeys?: number, maxLen?: number): string[];
2701
+ /**
2702
+ * Create a new instance of IW3cTraceState which is a child of this instance, meaning it will inherit the keys
2703
+ * and values from this instance but any changes made to the child will not affect this instance.
2704
+ * @returns A new instance of IW3cTraceState which is a child of this instance
2705
+ */
2706
+ child(): IW3cTraceState;
2707
+ }
2708
+
2440
2709
  interface IWatchDetails<T = IConfiguration> {
2441
2710
  /**
2442
2711
  * The current config object