@microsoft/applicationinsights-debugplugin-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.
- package/browser/es5/{ai.dbg.3.4.0-nightlybeta3.2505-36.cjs.js → ai.dbg.3.4.0-nightlybeta3.2507-23.cjs.js} +18 -19
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.cjs.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.cjs.min.js +6 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.cjs.min.js.map +1 -0
- package/browser/es5/{ai.dbg.3.4.0-nightlybeta3.2505-36.gbl.js → ai.dbg.3.4.0-nightlybeta3.2507-23.gbl.js} +20 -21
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.gbl.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.gbl.min.js +6 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.gbl.min.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.integrity.json +66 -0
- package/browser/es5/{ai.dbg.3.4.0-nightlybeta3.2505-36.js → ai.dbg.3.4.0-nightlybeta3.2507-23.js} +20 -21
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.min.js +6 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2507-23.min.js.map +1 -0
- package/browser/es5/ai.dbg.3.cjs.js +17 -18
- package/browser/es5/ai.dbg.3.cjs.js.map +1 -1
- package/browser/es5/ai.dbg.3.cjs.min.js +2 -2
- package/browser/es5/ai.dbg.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.dbg.3.gbl.js +19 -20
- package/browser/es5/ai.dbg.3.gbl.js.map +1 -1
- package/browser/es5/ai.dbg.3.gbl.min.js +2 -2
- package/browser/es5/ai.dbg.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.dbg.3.integrity.json +25 -25
- package/browser/es5/ai.dbg.3.js +19 -20
- package/browser/es5/ai.dbg.3.js.map +1 -1
- package/browser/es5/ai.dbg.3.min.js +2 -2
- package/browser/es5/ai.dbg.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-debugplugin-js.js +17 -18
- package/dist/es5/applicationinsights-debugplugin-js.js.map +1 -1
- package/dist/es5/applicationinsights-debugplugin-js.min.js +2 -2
- package/dist/es5/applicationinsights-debugplugin-js.min.js.map +1 -1
- package/dist-es5/DebugPlugin.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-debugplugin-js.js +1 -1
- package/dist-es5/components/Dashboard.js +1 -1
- package/dist-es5/components/LogEntry.js +1 -1
- package/dist-es5/components/debugBins.js +1 -1
- package/dist-es5/components/filterList.js +1 -1
- package/dist-es5/components/helpers.js +1 -1
- package/dist-es5/components/styleNodeSrc.js +1 -1
- package/dist-es5/interfaces/IDebugPluginConfig.js +1 -1
- package/package.json +3 -3
- package/types/applicationinsights-debugplugin-js.d.ts +1 -1
- package/types/applicationinsights-debugplugin-js.namespaced.d.ts +218 -10
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.cjs.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.cjs.min.js +0 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.cjs.min.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.gbl.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.gbl.min.js +0 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.gbl.min.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.integrity.json +0 -66
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.min.js +0 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2505-36.min.js.map +0 -1
package/dist-es5/DebugPlugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { isArray, isBoolean, isError, isNumber, isObject, isString, objToString } from "@microsoft/applicationinsights-core-js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-debugplugin-js",
|
|
3
|
-
"version": "3.4.0-nightlybeta3.
|
|
3
|
+
"version": "3.4.0-nightlybeta3.2507-23",
|
|
4
4
|
"description": "Microsoft Application Insights JavaScript SDK - Debug Plugin extension",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@microsoft/dynamicproto-js": "^2.0.3",
|
|
55
|
-
"@microsoft/applicationinsights-common": "3.4.0-nightlybeta3.
|
|
56
|
-
"@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.
|
|
55
|
+
"@microsoft/applicationinsights-common": "3.4.0-nightlybeta3.2507-23",
|
|
56
|
+
"@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.2507-23",
|
|
57
57
|
"@microsoft/applicationinsights-shims": "3.0.1",
|
|
58
58
|
"@nevware21/ts-utils": ">= 0.11.8 < 2.x"
|
|
59
59
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.
|
|
2
|
+
* Microsoft.ApplicationInsights, 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
|
|
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.
|
|
@@ -261,6 +264,30 @@ declare namespace ApplicationInsights {
|
|
|
261
264
|
|
|
262
265
|
type EnumValue<E = any> = EnumCls<E>;
|
|
263
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Controls how the SDK should look for trace headers (traceparent/tracestate) from the initial page load
|
|
269
|
+
* The values are bitwise OR'd together to allow for multiple values to be set at once.
|
|
270
|
+
* @since 3.4.0
|
|
271
|
+
*/
|
|
272
|
+
const enum eTraceHeadersMode {
|
|
273
|
+
/**
|
|
274
|
+
* Don't look for any trace headers
|
|
275
|
+
*/
|
|
276
|
+
None = 0,
|
|
277
|
+
/**
|
|
278
|
+
* Look for traceparent header/meta tag
|
|
279
|
+
*/
|
|
280
|
+
TraceParent = 1,
|
|
281
|
+
/**
|
|
282
|
+
* Look for tracestate header/meta tag
|
|
283
|
+
*/
|
|
284
|
+
TraceState = 2,
|
|
285
|
+
/**
|
|
286
|
+
* Look for both traceparent and tracestate headers/meta tags
|
|
287
|
+
*/
|
|
288
|
+
All = 3
|
|
289
|
+
}
|
|
290
|
+
|
|
264
291
|
const enum FeatureOptInMode {
|
|
265
292
|
/**
|
|
266
293
|
* not set, completely depends on cdn cfg
|
|
@@ -403,7 +430,7 @@ declare namespace ApplicationInsights {
|
|
|
403
430
|
*/
|
|
404
431
|
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
|
|
405
432
|
/**
|
|
406
|
-
* Gets the current distributed trace context for this instance
|
|
433
|
+
* Gets the current distributed trace active context for this instance
|
|
407
434
|
* @param createNew - Optional flag to create a new instance if one doesn't currently exist, defaults to true
|
|
408
435
|
*/
|
|
409
436
|
getTraceCtx(createNew?: boolean): IDistributedTraceContext | null;
|
|
@@ -452,9 +479,12 @@ declare namespace ApplicationInsights {
|
|
|
452
479
|
*/
|
|
453
480
|
getCfg: () => IConfiguration;
|
|
454
481
|
/**
|
|
455
|
-
* Gets the named extension
|
|
482
|
+
* Gets the named extension configuration
|
|
483
|
+
* @param identifier - The named extension identifier
|
|
484
|
+
* @param defaultValue - The default value(s) to return if no defined config exists
|
|
485
|
+
* @param rootOnly - If true, only the look for the configuration in the top level and not in the "extensionConfig"
|
|
456
486
|
*/
|
|
457
|
-
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T
|
|
487
|
+
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>, rootOnly?: boolean) => T;
|
|
458
488
|
/**
|
|
459
489
|
* Gets the named config from either the named identifier extension or core config if neither exist then the
|
|
460
490
|
* default value is returned
|
|
@@ -750,7 +780,7 @@ declare namespace ApplicationInsights {
|
|
|
750
780
|
* }
|
|
751
781
|
* ```
|
|
752
782
|
*
|
|
753
|
-
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/
|
|
783
|
+
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/PageUnloadEvents.html).
|
|
754
784
|
*/
|
|
755
785
|
disablePageUnloadEvents?: string[];
|
|
756
786
|
/**
|
|
@@ -765,7 +795,7 @@ declare namespace ApplicationInsights {
|
|
|
765
795
|
* }
|
|
766
796
|
* ```
|
|
767
797
|
*
|
|
768
|
-
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/
|
|
798
|
+
* For more details, see the [Page Unload Events documentation](https://microsoft.github.io/ApplicationInsights-JS/PageUnloadEvents.html).
|
|
769
799
|
*/
|
|
770
800
|
disablePageShowEvents?: string[];
|
|
771
801
|
/**
|
|
@@ -807,6 +837,25 @@ declare namespace ApplicationInsights {
|
|
|
807
837
|
* @since 3.3.2
|
|
808
838
|
*/
|
|
809
839
|
expCfg?: IExceptionConfig;
|
|
840
|
+
/**
|
|
841
|
+
* [Optional] A flag to enable or disable the use of the field redaction for urls.
|
|
842
|
+
* @defaultValue true
|
|
843
|
+
*/
|
|
844
|
+
redactUrls?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* [Optional] Additional query parameters to redact beyond the default set.
|
|
847
|
+
* Use this to specify custom parameters that contain sensitive information.
|
|
848
|
+
* These will be combined with the default parameters that are redacted.
|
|
849
|
+
* @defaultValue ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"]
|
|
850
|
+
* @example ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature","auth_token", "api_key", "private_data"]
|
|
851
|
+
*/
|
|
852
|
+
redactQueryParams?: string[];
|
|
853
|
+
/**
|
|
854
|
+
* [Optional] Controls if the SDK should look for the `traceparent` and/or `tracestate` values from
|
|
855
|
+
* the service timing headers or meta tags from the initial page load.
|
|
856
|
+
* @defaultValue eTraceHeadersMode.All
|
|
857
|
+
*/
|
|
858
|
+
traceHdrMode?: eTraceHeadersMode;
|
|
810
859
|
}
|
|
811
860
|
|
|
812
861
|
interface ICookieMgr {
|
|
@@ -1015,8 +1064,13 @@ declare namespace ApplicationInsights {
|
|
|
1015
1064
|
*/
|
|
1016
1065
|
getName(): string;
|
|
1017
1066
|
/**
|
|
1018
|
-
* Sets the current name of the page
|
|
1067
|
+
* Sets the current name of the page, also updates the name for any parent context.
|
|
1068
|
+
* This is used to identify the page in the telemetry data.
|
|
1069
|
+
* @remarks This function updates the current and ALL parent contexts with the new name,
|
|
1070
|
+
* to just update the name of the current context, use the `pageName` property.
|
|
1019
1071
|
* @param pageName - The name of the page
|
|
1072
|
+
* @deprecated Use the `pageName` property to avoid the side effect of changing the page name of all
|
|
1073
|
+
* parent contexts.
|
|
1020
1074
|
*/
|
|
1021
1075
|
setName(pageName: string): void;
|
|
1022
1076
|
/**
|
|
@@ -1029,6 +1083,12 @@ declare namespace ApplicationInsights {
|
|
|
1029
1083
|
* Set the unique identifier for a trace. All requests / spans from the same trace share the same traceId.
|
|
1030
1084
|
* Must be conform to the W3C TraceContext specification, in a hex representation of 16-byte array.
|
|
1031
1085
|
* A.k.a. trace-id, TraceID or Distributed TraceID https://www.w3.org/TR/trace-context/#trace-id
|
|
1086
|
+
*
|
|
1087
|
+
* @remarks Sets the traceId for the current context AND all parent contexts, if you want to set the traceId
|
|
1088
|
+
* for the current context only, use the `traceId` property.
|
|
1089
|
+
* @param newValue - The traceId to set
|
|
1090
|
+
* @deprecated Use the `traceId` property to avoid the side effect of changing the traceId of all
|
|
1091
|
+
* parent contexts.
|
|
1032
1092
|
*/
|
|
1033
1093
|
setTraceId(newValue: string): void;
|
|
1034
1094
|
/**
|
|
@@ -1040,6 +1100,12 @@ declare namespace ApplicationInsights {
|
|
|
1040
1100
|
* Self-generated 8-bytes identifier of the incoming request. Must be a hex representation of 8-byte array.
|
|
1041
1101
|
* Also know as the parentId, used to link requests together
|
|
1042
1102
|
* https://www.w3.org/TR/trace-context/#parent-id
|
|
1103
|
+
*
|
|
1104
|
+
* @remarks Sets the spanId for the current context AND all parent contexts, if you want to set the spanId for
|
|
1105
|
+
* the current context only, use the `spanId` property.
|
|
1106
|
+
* @param newValue - The spanId to set
|
|
1107
|
+
* @deprecated Use the `spanId` property to avoid the side effect of changing the spanId of all
|
|
1108
|
+
* parent contexts.
|
|
1043
1109
|
*/
|
|
1044
1110
|
setSpanId(newValue: string): void;
|
|
1045
1111
|
/**
|
|
@@ -1048,9 +1114,80 @@ declare namespace ApplicationInsights {
|
|
|
1048
1114
|
getTraceFlags(): number | undefined;
|
|
1049
1115
|
/**
|
|
1050
1116
|
* https://www.w3.org/TR/trace-context/#trace-flags
|
|
1117
|
+
* @remarks Sets the trace flags for the current context and ALL parent contexts, if you want to set the trace
|
|
1118
|
+
* flags for the current context only, use the `traceFlags` property.
|
|
1051
1119
|
* @param newValue - An integer representation of the W3C TraceContext trace-flags.
|
|
1120
|
+
* @deprecated Use the `traceFlags` property to avoid the side effect of changing the traceFlags of all
|
|
1121
|
+
* parent contexts.
|
|
1052
1122
|
*/
|
|
1053
1123
|
setTraceFlags(newValue?: number): void;
|
|
1124
|
+
/**
|
|
1125
|
+
* Returns the current name of the page
|
|
1126
|
+
* @remarks This function updates the current context only, to update the name of the current and ALL parent contexts,
|
|
1127
|
+
* use the `setName` method.
|
|
1128
|
+
* @default undefined
|
|
1129
|
+
* @since 3.4.0
|
|
1130
|
+
*/
|
|
1131
|
+
pageName: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* The current ID of the trace that this span belongs to. It is worldwide unique
|
|
1134
|
+
* with practically sufficient probability by being made as 16 randomly
|
|
1135
|
+
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
|
|
1136
|
+
* 128 bits.
|
|
1137
|
+
* @remarks If you update this value, it will only update for the current context, not the parent context,
|
|
1138
|
+
* if you need to update the current and ALL parent contexts, use the `setTraceId` method.
|
|
1139
|
+
* @since 3.4.0
|
|
1140
|
+
*/
|
|
1141
|
+
traceId: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* The ID of the Span. It is globally unique with practically sufficient
|
|
1144
|
+
* probability by being made as 8 randomly generated bytes, encoded as a 16
|
|
1145
|
+
* lowercase hex characters corresponding to 64 bits.
|
|
1146
|
+
* If you update this value, it will only update for the current context, not the parent context.
|
|
1147
|
+
* @remarks If you update this value, it will only update for the current context, not the parent context,
|
|
1148
|
+
* if you need to update the current and ALL parent contexts, use the `setSpanId` method.
|
|
1149
|
+
* @since 3.4.0
|
|
1150
|
+
*/
|
|
1151
|
+
spanId: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* Returns true if the current context was initialized (propagated) from a remote parent.
|
|
1154
|
+
* @since 3.4.0
|
|
1155
|
+
* @default false
|
|
1156
|
+
* @returns True if the context was propagated from a remote parent
|
|
1157
|
+
*/
|
|
1158
|
+
readonly isRemote: boolean;
|
|
1159
|
+
/**
|
|
1160
|
+
* Trace flags to propagate.
|
|
1161
|
+
*
|
|
1162
|
+
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
|
|
1163
|
+
* sampled or not. When set, the least significant bit documents that the
|
|
1164
|
+
* caller may have recorded trace data. A caller who does not record trace
|
|
1165
|
+
* data out-of-band leaves this flag unset.
|
|
1166
|
+
*
|
|
1167
|
+
* see {@link eW3CTraceFlags} for valid flag values.
|
|
1168
|
+
*
|
|
1169
|
+
* @remarks If you update this value, it will only update for the current context, not the parent context,
|
|
1170
|
+
* if you need to update the current and ALL parent contexts, use the `setTraceFlags` method.
|
|
1171
|
+
* @since 3.4.0
|
|
1172
|
+
*/
|
|
1173
|
+
traceFlags?: number;
|
|
1174
|
+
/**
|
|
1175
|
+
* Returns the current trace state which will be used to propgate context across different services.
|
|
1176
|
+
* Updating (adding / removing keys) of the trace state will modify the current context.
|
|
1177
|
+
* @remarks Unlike the OpenTelemetry {@link TraceState}, this value is a mutable object, so you can
|
|
1178
|
+
* modify it directly you do not need to reassign the new value to this property.
|
|
1179
|
+
* @since 3.4.0
|
|
1180
|
+
*/
|
|
1181
|
+
readonly traceState: IW3cTraceState;
|
|
1182
|
+
/**
|
|
1183
|
+
* Provides access to the parent context of the current context.
|
|
1184
|
+
* @remarks This is a read-only property, you cannot modify the parent context directly, you can only
|
|
1185
|
+
* modify the current context. If you need to modify the parent context, you need to do it through the
|
|
1186
|
+
* current context using the `setTraceId`, `setSpanId`, `setTraceFlags` and `setName` methods.
|
|
1187
|
+
* @default null
|
|
1188
|
+
* @since 3.4.0
|
|
1189
|
+
*/
|
|
1190
|
+
readonly parentCtx?: IDistributedTraceContext | null;
|
|
1054
1191
|
}
|
|
1055
1192
|
|
|
1056
1193
|
/**
|
|
@@ -1799,9 +1936,10 @@ declare namespace ApplicationInsights {
|
|
|
1799
1936
|
*/
|
|
1800
1937
|
interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
|
|
1801
1938
|
/**
|
|
1802
|
-
* Set next extension for telemetry processing, this is
|
|
1939
|
+
* Set next extension for telemetry processing, this is now optional as plugins should use the
|
|
1803
1940
|
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
1804
1941
|
* now for backward compatibility only.
|
|
1942
|
+
* @deprecated - Use processNext() function of the passed IProcessTelemetryContext instead
|
|
1805
1943
|
*/
|
|
1806
1944
|
setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
1807
1945
|
/**
|
|
@@ -2021,6 +2159,76 @@ declare namespace ApplicationInsights {
|
|
|
2021
2159
|
run: (logger?: IDiagnosticLogger) => void;
|
|
2022
2160
|
}
|
|
2023
2161
|
|
|
2162
|
+
/**
|
|
2163
|
+
* Represents a mutable [W3C trace state list](https://www.w3.org/TR/trace-context/#tracestate-header), this is a
|
|
2164
|
+
* list of key/value pairs that are used to pass trace state information between different tracing systems. The
|
|
2165
|
+
* list is ordered and the order is important as it determines the processing order.
|
|
2166
|
+
*
|
|
2167
|
+
* Importantly instances of this type are mutable, change made to an instance via {@link IW3cTraceState.set} or
|
|
2168
|
+
* {@link IW3cTraceState.del} will be reflected on the instance and any child instances that use it as a parent.
|
|
2169
|
+
* However, any parent instance associated with an instance will not be modified by operations on that particular
|
|
2170
|
+
* instance.
|
|
2171
|
+
*
|
|
2172
|
+
* @since 3.4.0
|
|
2173
|
+
*/
|
|
2174
|
+
interface IW3cTraceState {
|
|
2175
|
+
/**
|
|
2176
|
+
* Returns a readonly array of the current keys associated with the trace state, keys are returned in the
|
|
2177
|
+
* required processing order and if this instance has a parent the keys from the parent will be included
|
|
2178
|
+
* unless they have been removed (deleted) from the child instance.
|
|
2179
|
+
* Once created any modifications to the parent will also be reflected in the child, this is different from
|
|
2180
|
+
* the OpenTelemetry implementation which creates a new instance for each call.
|
|
2181
|
+
* @returns A readonly array of the current keys associated with the trace state
|
|
2182
|
+
*/
|
|
2183
|
+
readonly keys: string[];
|
|
2184
|
+
/**
|
|
2185
|
+
* Check if the trace state list is empty, meaning it has no keys or values.
|
|
2186
|
+
* This exists to allow for quick checks without needing to create a new array of keys.
|
|
2187
|
+
* @since 3.4.0
|
|
2188
|
+
* @returns true if the trace state list is empty, false otherwise
|
|
2189
|
+
*/
|
|
2190
|
+
readonly isEmpty: boolean;
|
|
2191
|
+
/**
|
|
2192
|
+
* Get the value for the specified key that is associated with this instance, either directly or from the parent.
|
|
2193
|
+
* @param key - The key to lookup
|
|
2194
|
+
* @returns The value for the key, or undefined if not found
|
|
2195
|
+
*/
|
|
2196
|
+
get(key: string): string | undefined;
|
|
2197
|
+
/**
|
|
2198
|
+
* Set the value for the specified key for this instance, returning its new location within the list.
|
|
2199
|
+
* - 0 is the front of the list
|
|
2200
|
+
* - -1 not set because the key/value pair is invalid
|
|
2201
|
+
* If the key already exists it will be removed from its current location and added to the front of the list. And
|
|
2202
|
+
* if the key was in the parent this will override the value inherited from the parent, more importantly it will
|
|
2203
|
+
* not modify the parent value.
|
|
2204
|
+
* @param key - The key to set
|
|
2205
|
+
* @param value - The value to set
|
|
2206
|
+
* @returns 0 if successful, -1 if not
|
|
2207
|
+
*/
|
|
2208
|
+
set(key: string, value: string): number;
|
|
2209
|
+
/**
|
|
2210
|
+
* Delete the specified key from this instance, if the key was in the parent it will be removed (hidden) from
|
|
2211
|
+
* this instance but will still be available directly from the parent.
|
|
2212
|
+
* @param key - The key to delete
|
|
2213
|
+
*/
|
|
2214
|
+
del(key: string): void;
|
|
2215
|
+
/**
|
|
2216
|
+
* Format the trace state list into a strings where each string can be used as a header value.
|
|
2217
|
+
* This will return an empty array if the trace state list is empty.
|
|
2218
|
+
* @param maxHeaders - The maximum number of entries to include in the output, once the limit is reached no more entries will be included
|
|
2219
|
+
* @param maxKeys - The maximum number of keys to include in the output, once the limit is reached no more keys will be included
|
|
2220
|
+
* @param maxLen - The maximum length of each header value, once the limit is reached a new header value will be created
|
|
2221
|
+
* @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
|
|
2222
|
+
*/
|
|
2223
|
+
hdrs(maxHeaders?: number, maxKeys?: number, maxLen?: number): string[];
|
|
2224
|
+
/**
|
|
2225
|
+
* Create a new instance of IW3cTraceState which is a child of this instance, meaning it will inherit the keys
|
|
2226
|
+
* and values from this instance but any changes made to the child will not affect this instance.
|
|
2227
|
+
* @returns A new instance of IW3cTraceState which is a child of this instance
|
|
2228
|
+
*/
|
|
2229
|
+
child(): IW3cTraceState;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2024
2232
|
interface IWatchDetails<T = IConfiguration> {
|
|
2025
2233
|
/**
|
|
2026
2234
|
* The current config object
|