@microsoft/applicationinsights-core-js 2.8.16-nightly.2308-04 → 2.8.16-nightly.2308-17
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/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +18 -13
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +42 -9
- package/dist/applicationinsights-core-js.api.md +2 -2
- package/dist/applicationinsights-core-js.d.ts +6 -4
- package/dist/applicationinsights-core-js.js +18 -13
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +6 -4
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +3 -3
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +22 -14
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +5 -5
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/InternalConstants.ts +2 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +19 -11
- package/types/JavaScriptSDK/W3cTraceParent.d.ts +5 -3
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.36.
|
|
4
|
+
"toolVersion": "7.36.4",
|
|
5
5
|
"schemaVersion": 1011,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -8920,11 +8920,19 @@
|
|
|
8920
8920
|
{
|
|
8921
8921
|
"kind": "Function",
|
|
8922
8922
|
"canonicalReference": "@microsoft/applicationinsights-core-js!findW3cTraceParent:function(1)",
|
|
8923
|
-
"docComment": "/**\n * Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.\n *\n * @returns \n */\n",
|
|
8923
|
+
"docComment": "/**\n * Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.\n *\n * @param selectIdx - If the found value is comma separated which is the preferred entry to select, defaults to the first\n *\n * @returns \n */\n",
|
|
8924
8924
|
"excerptTokens": [
|
|
8925
8925
|
{
|
|
8926
8926
|
"kind": "Content",
|
|
8927
|
-
"text": "export declare function findW3cTraceParent(
|
|
8927
|
+
"text": "export declare function findW3cTraceParent(selectIdx?: "
|
|
8928
|
+
},
|
|
8929
|
+
{
|
|
8930
|
+
"kind": "Content",
|
|
8931
|
+
"text": "number"
|
|
8932
|
+
},
|
|
8933
|
+
{
|
|
8934
|
+
"kind": "Content",
|
|
8935
|
+
"text": "): "
|
|
8928
8936
|
},
|
|
8929
8937
|
{
|
|
8930
8938
|
"kind": "Reference",
|
|
@@ -8938,12 +8946,21 @@
|
|
|
8938
8946
|
],
|
|
8939
8947
|
"fileUrlPath": "types/JavaScriptSDK/W3cTraceParent.d.ts",
|
|
8940
8948
|
"returnTypeTokenRange": {
|
|
8941
|
-
"startIndex":
|
|
8942
|
-
"endIndex":
|
|
8949
|
+
"startIndex": 3,
|
|
8950
|
+
"endIndex": 4
|
|
8943
8951
|
},
|
|
8944
8952
|
"releaseTag": "Public",
|
|
8945
8953
|
"overloadIndex": 1,
|
|
8946
|
-
"parameters": [
|
|
8954
|
+
"parameters": [
|
|
8955
|
+
{
|
|
8956
|
+
"parameterName": "selectIdx",
|
|
8957
|
+
"parameterTypeTokenRange": {
|
|
8958
|
+
"startIndex": 1,
|
|
8959
|
+
"endIndex": 2
|
|
8960
|
+
},
|
|
8961
|
+
"isOptional": true
|
|
8962
|
+
}
|
|
8963
|
+
],
|
|
8947
8964
|
"name": "findW3cTraceParent"
|
|
8948
8965
|
},
|
|
8949
8966
|
{
|
|
@@ -22586,7 +22603,7 @@
|
|
|
22586
22603
|
{
|
|
22587
22604
|
"kind": "Function",
|
|
22588
22605
|
"canonicalReference": "@microsoft/applicationinsights-core-js!parseTraceParent:function(1)",
|
|
22589
|
-
"docComment": "/**\n * Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)\n *\n * @param value - \n *\n * @returns \n */\n",
|
|
22606
|
+
"docComment": "/**\n * Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)\n *\n * @param value - The value to be parsed\n *\n * @param selectIdx - If the found value is comma separated which is the preferred entry to select, defaults to the first\n *\n * @returns \n */\n",
|
|
22590
22607
|
"excerptTokens": [
|
|
22591
22608
|
{
|
|
22592
22609
|
"kind": "Content",
|
|
@@ -22596,6 +22613,14 @@
|
|
|
22596
22613
|
"kind": "Content",
|
|
22597
22614
|
"text": "string"
|
|
22598
22615
|
},
|
|
22616
|
+
{
|
|
22617
|
+
"kind": "Content",
|
|
22618
|
+
"text": ", selectIdx?: "
|
|
22619
|
+
},
|
|
22620
|
+
{
|
|
22621
|
+
"kind": "Content",
|
|
22622
|
+
"text": "number"
|
|
22623
|
+
},
|
|
22599
22624
|
{
|
|
22600
22625
|
"kind": "Content",
|
|
22601
22626
|
"text": "): "
|
|
@@ -22612,8 +22637,8 @@
|
|
|
22612
22637
|
],
|
|
22613
22638
|
"fileUrlPath": "types/JavaScriptSDK/W3cTraceParent.d.ts",
|
|
22614
22639
|
"returnTypeTokenRange": {
|
|
22615
|
-
"startIndex":
|
|
22616
|
-
"endIndex":
|
|
22640
|
+
"startIndex": 5,
|
|
22641
|
+
"endIndex": 6
|
|
22617
22642
|
},
|
|
22618
22643
|
"releaseTag": "Public",
|
|
22619
22644
|
"overloadIndex": 1,
|
|
@@ -22625,6 +22650,14 @@
|
|
|
22625
22650
|
"endIndex": 2
|
|
22626
22651
|
},
|
|
22627
22652
|
"isOptional": false
|
|
22653
|
+
},
|
|
22654
|
+
{
|
|
22655
|
+
"parameterName": "selectIdx",
|
|
22656
|
+
"parameterTypeTokenRange": {
|
|
22657
|
+
"startIndex": 3,
|
|
22658
|
+
"endIndex": 4
|
|
22659
|
+
},
|
|
22660
|
+
"isOptional": true
|
|
22628
22661
|
}
|
|
22629
22662
|
],
|
|
22630
22663
|
"name": "parseTraceParent"
|
|
@@ -439,7 +439,7 @@ export function findMetaTag(name: string): any;
|
|
|
439
439
|
export function findNamedServerTiming(name: string): any;
|
|
440
440
|
|
|
441
441
|
// @public
|
|
442
|
-
export function findW3cTraceParent(): ITraceParent;
|
|
442
|
+
export function findW3cTraceParent(selectIdx?: number): ITraceParent;
|
|
443
443
|
|
|
444
444
|
// @public
|
|
445
445
|
export function formatTraceParent(value: ITraceParent): string;
|
|
@@ -1159,7 +1159,7 @@ export function objToString(obj: any): any;
|
|
|
1159
1159
|
export function optimizeObject<T>(theObject: T): T;
|
|
1160
1160
|
|
|
1161
1161
|
// @public
|
|
1162
|
-
export function parseTraceParent(value: string): ITraceParent;
|
|
1162
|
+
export function parseTraceParent(value: string, selectIdx?: number): ITraceParent;
|
|
1163
1163
|
|
|
1164
1164
|
// @public (undocumented)
|
|
1165
1165
|
export class PerfEvent implements IPerfEvent {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 2.8.16-nightly.2308-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 2.8.16-nightly.2308-17
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -718,9 +718,10 @@ declare namespace ApplicationInsights {
|
|
|
718
718
|
|
|
719
719
|
/**
|
|
720
720
|
* Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.
|
|
721
|
+
* @param selectIdx - If the found value is comma separated which is the preferred entry to select, defaults to the first
|
|
721
722
|
* @returns
|
|
722
723
|
*/
|
|
723
|
-
function findW3cTraceParent(): ITraceParent;
|
|
724
|
+
function findW3cTraceParent(selectIdx?: number): ITraceParent;
|
|
724
725
|
|
|
725
726
|
/**
|
|
726
727
|
* Format the ITraceParent value as a string using the supported and know version formats.
|
|
@@ -2623,10 +2624,11 @@ declare namespace ApplicationInsights {
|
|
|
2623
2624
|
/**
|
|
2624
2625
|
* Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
2625
2626
|
*
|
|
2626
|
-
* @param value
|
|
2627
|
+
* @param value - The value to be parsed
|
|
2628
|
+
* @param selectIdx - If the found value is comma separated which is the preferred entry to select, defaults to the first
|
|
2627
2629
|
* @returns
|
|
2628
2630
|
*/
|
|
2629
|
-
function parseTraceParent(value: string): ITraceParent;
|
|
2631
|
+
function parseTraceParent(value: string, selectIdx?: number): ITraceParent;
|
|
2630
2632
|
|
|
2631
2633
|
class PerfEvent implements IPerfEvent {
|
|
2632
2634
|
static ParentContextKey: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.8.16-nightly.2308-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.8.16-nightly.2308-17
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1730,7 +1730,7 @@
|
|
|
1730
1730
|
}
|
|
1731
1731
|
|
|
1732
1732
|
var _objDefineProperty = ObjDefineProperty;
|
|
1733
|
-
var version = "2.8.16-nightly.2308-
|
|
1733
|
+
var version = "2.8.16-nightly.2308-17";
|
|
1734
1734
|
var instanceName = "." + newId(6);
|
|
1735
1735
|
var _dataUid = 0;
|
|
1736
1736
|
function _createAccessor(target, prop, value) {
|
|
@@ -2488,7 +2488,7 @@
|
|
|
2488
2488
|
return _legacyCookieMgr(null, logger).del(name);
|
|
2489
2489
|
}
|
|
2490
2490
|
|
|
2491
|
-
var TRACE_PARENT_REGEX = /^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]
|
|
2491
|
+
var TRACE_PARENT_REGEX = /^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i;
|
|
2492
2492
|
var DEFAULT_VERSION = "00";
|
|
2493
2493
|
var INVALID_VERSION = "ff";
|
|
2494
2494
|
var INVALID_TRACE_ID = "00000000000000000000000000000000";
|
|
@@ -2496,7 +2496,7 @@
|
|
|
2496
2496
|
var SAMPLED_FLAG = 0x01;
|
|
2497
2497
|
function _isValid(value, len, invalidValue) {
|
|
2498
2498
|
if (value && value[_DYN_LENGTH ] === len && value !== invalidValue) {
|
|
2499
|
-
return !!value.match(/^[\da-f]*$/);
|
|
2499
|
+
return !!value.match(/^[\da-f]*$/i);
|
|
2500
2500
|
}
|
|
2501
2501
|
return false;
|
|
2502
2502
|
}
|
|
@@ -2525,7 +2525,7 @@
|
|
|
2525
2525
|
_a.traceFlags = flags >= 0 && flags <= 0xFF ? flags : 1,
|
|
2526
2526
|
_a;
|
|
2527
2527
|
}
|
|
2528
|
-
function parseTraceParent(value) {
|
|
2528
|
+
function parseTraceParent(value, selectIdx) {
|
|
2529
2529
|
var _a;
|
|
2530
2530
|
if (!value) {
|
|
2531
2531
|
return null;
|
|
@@ -2536,6 +2536,10 @@
|
|
|
2536
2536
|
if (!value || !isString(value) || value[_DYN_LENGTH ] > 8192) {
|
|
2537
2537
|
return null;
|
|
2538
2538
|
}
|
|
2539
|
+
if (value[_DYN_INDEX_OF ](",") !== -1) {
|
|
2540
|
+
var values = value[_DYN_SPLIT ](",");
|
|
2541
|
+
value = values[selectIdx > 0 && values[_DYN_LENGTH ] > selectIdx ? selectIdx : 0];
|
|
2542
|
+
}
|
|
2539
2543
|
var match = TRACE_PARENT_REGEX.exec(strTrim(value));
|
|
2540
2544
|
if (!match ||
|
|
2541
2545
|
match[1] === INVALID_VERSION ||
|
|
@@ -2543,10 +2547,11 @@
|
|
|
2543
2547
|
match[3] === INVALID_SPAN_ID) {
|
|
2544
2548
|
return null;
|
|
2545
2549
|
}
|
|
2546
|
-
return _a = {
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
+
return _a = {
|
|
2551
|
+
version: (match[1] || STR_EMPTY)[_DYN_TO_LOWER_CASE ](),
|
|
2552
|
+
traceId: (match[2] || STR_EMPTY)[_DYN_TO_LOWER_CASE ](),
|
|
2553
|
+
spanId: (match[3] || STR_EMPTY)[_DYN_TO_LOWER_CASE ]()
|
|
2554
|
+
},
|
|
2550
2555
|
_a[_DYN_TRACE_FLAGS ] = parseInt(match[4], 16),
|
|
2551
2556
|
_a;
|
|
2552
2557
|
}
|
|
@@ -2582,15 +2587,15 @@
|
|
|
2582
2587
|
if (version !== "00" && version !== "ff") {
|
|
2583
2588
|
version = DEFAULT_VERSION;
|
|
2584
2589
|
}
|
|
2585
|
-
return "".concat(version, "-").concat(_formatValue(value.traceId, 32, INVALID_TRACE_ID), "-").concat(_formatValue(value.spanId, 16, INVALID_SPAN_ID), "-").concat(flags);
|
|
2590
|
+
return "".concat(version.toLowerCase(), "-").concat(_formatValue(value.traceId, 32, INVALID_TRACE_ID).toLowerCase(), "-").concat(_formatValue(value.spanId, 16, INVALID_SPAN_ID).toLowerCase(), "-").concat(flags.toLowerCase());
|
|
2586
2591
|
}
|
|
2587
2592
|
return "";
|
|
2588
2593
|
}
|
|
2589
|
-
function findW3cTraceParent() {
|
|
2594
|
+
function findW3cTraceParent(selectIdx) {
|
|
2590
2595
|
var name = "traceparent";
|
|
2591
|
-
var traceParent = parseTraceParent(findMetaTag(name));
|
|
2596
|
+
var traceParent = parseTraceParent(findMetaTag(name), selectIdx);
|
|
2592
2597
|
if (!traceParent) {
|
|
2593
|
-
traceParent = parseTraceParent(findNamedServerTiming(name));
|
|
2598
|
+
traceParent = parseTraceParent(findNamedServerTiming(name), selectIdx);
|
|
2594
2599
|
}
|
|
2595
2600
|
return traceParent;
|
|
2596
2601
|
}
|