@microsoft/applicationinsights-common 2.8.4-nightly.2205-09 → 2.8.5-nightly.2206-02
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-common.integrity.json +9 -9
- package/browser/applicationinsights-common.js +174 -127
- package/browser/applicationinsights-common.js.map +1 -1
- package/browser/applicationinsights-common.min.js +2 -2
- package/browser/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.api.json +81 -501
- package/dist/applicationinsights-common.api.md +24 -23
- package/dist/applicationinsights-common.d.ts +33 -91
- package/dist/applicationinsights-common.js +174 -127
- package/dist/applicationinsights-common.js.map +1 -1
- package/dist/applicationinsights-common.min.js +2 -2
- package/dist/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.rollup.d.ts +33 -91
- package/dist-esm/ConnectionStringParser.js +1 -1
- package/dist-esm/Constants.js +1 -1
- package/dist-esm/DomHelperFuncs.js +1 -1
- package/dist-esm/Enums.js +1 -1
- package/dist-esm/HelperFuncs.js +1 -1
- package/dist-esm/Interfaces/ConnectionString.js +1 -1
- package/dist-esm/Interfaces/Context/IApplication.js +1 -1
- package/dist-esm/Interfaces/Context/IDevice.js +1 -1
- package/dist-esm/Interfaces/Context/IInternal.js +1 -1
- package/dist-esm/Interfaces/Context/ILocation.js +1 -1
- package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-esm/Interfaces/Context/ISample.js +1 -1
- package/dist-esm/Interfaces/Context/ISession.js +1 -1
- package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-esm/Interfaces/Context/IUser.js +1 -1
- package/dist-esm/Interfaces/Context/IWeb.js +1 -1
- package/dist-esm/Interfaces/Contracts/AvailabilityData.js +1 -1
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
- package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
- package/dist-esm/Interfaces/Contracts/IData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js +1 -1
- package/dist-esm/Interfaces/IAppInsights.js +1 -1
- package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
- package/dist-esm/Interfaces/IConfig.js +1 -1
- package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
- package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPartC.js +1 -1
- package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-esm/Interfaces/IRequestContext.js +1 -1
- package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
- package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-esm/Interfaces/PartAExtensions.js +1 -1
- package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-esm/RequestResponseHeaders.js +1 -1
- package/dist-esm/StorageHelperFuncs.js +1 -1
- package/dist-esm/Telemetry/Common/Data.js +1 -1
- package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
- package/dist-esm/Telemetry/Common/DataSanitizer.js +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +1 -1
- package/dist-esm/Telemetry/Event.js +1 -1
- package/dist-esm/Telemetry/Exception.js +1 -1
- package/dist-esm/Telemetry/Metric.js +1 -1
- package/dist-esm/Telemetry/PageView.js +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-esm/Telemetry/Trace.js +1 -1
- package/dist-esm/TelemetryItemCreator.js +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +45 -2
- package/dist-esm/Util.js.map +1 -1
- package/dist-esm/applicationinsights-common.js +3 -4
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +2 -2
- package/src/Interfaces/Context/ITelemetryTrace.ts +6 -0
- package/src/Util.ts +49 -2
- package/src/applicationinsights-common.ts +6 -6
- package/types/Interfaces/Context/ITelemetryTrace.d.ts +5 -0
- package/types/Util.d.ts +9 -1
- package/types/applicationinsights-common.d.ts +2 -4
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/Interfaces/ITraceParent.js +0 -8
- package/dist-esm/Interfaces/ITraceParent.js.map +0 -1
- package/dist-esm/W3cTraceParent.js +0 -192
- package/dist-esm/W3cTraceParent.js.map +0 -1
- package/src/Interfaces/ITraceParent.ts +0 -38
- package/src/W3cTraceParent.ts +0 -219
- package/types/Interfaces/ITraceParent.d.ts +0 -32
- package/types/W3cTraceParent.d.ts +0 -59
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Common JavaScript Library, 2.8.
|
|
2
|
+
* Microsoft Application Insights Common JavaScript Library, 2.8.5-nightly.2206-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -13,16 +13,26 @@
|
|
|
13
13
|
* ---------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { createTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
16
17
|
import { _eInternalMessageId } from '@microsoft/applicationinsights-core-js';
|
|
17
18
|
import { EnumValue } from '@microsoft/applicationinsights-core-js';
|
|
19
|
+
import { findW3cTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
20
|
+
import { formatTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
18
21
|
import { IChannelControls } from '@microsoft/applicationinsights-core-js';
|
|
19
22
|
import { IConfiguration } from '@microsoft/applicationinsights-core-js';
|
|
20
23
|
import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
|
|
21
24
|
import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
|
|
22
25
|
import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
|
|
26
|
+
import { IDistributedTraceContext } from '@microsoft/applicationinsights-core-js';
|
|
23
27
|
import { IPlugin } from '@microsoft/applicationinsights-core-js';
|
|
24
28
|
import { isBeaconsSupported as isBeaconApiSupported } from '@microsoft/applicationinsights-core-js';
|
|
29
|
+
import { isSampledFlag } from '@microsoft/applicationinsights-core-js';
|
|
30
|
+
import { isValidSpanId } from '@microsoft/applicationinsights-core-js';
|
|
31
|
+
import { isValidTraceId } from '@microsoft/applicationinsights-core-js';
|
|
32
|
+
import { isValidTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
25
33
|
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
34
|
+
import { ITraceParent } from '@microsoft/applicationinsights-core-js';
|
|
35
|
+
import { parseTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
26
36
|
|
|
27
37
|
/**
|
|
28
38
|
* Data struct to contain only C section with custom fields.
|
|
@@ -74,6 +84,14 @@ declare const ContextTagKeys_base: new () => IContextTagKeys;
|
|
|
74
84
|
|
|
75
85
|
export declare const CorrelationIdHelper: ICorrelationIdHelper;
|
|
76
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Creates a IDistributedTraceContext from an optional telemetryTrace
|
|
89
|
+
* @param telemetryTrace - The telemetryTrace instance that is being wrapped
|
|
90
|
+
* @param parentCtx - An optional parent distributed trace instance, almost always undefined as this scenario is only used in the case of multiple property handlers.
|
|
91
|
+
* @returns A new IDistributedTraceContext instance that is backed by the telemetryTrace or temporary object
|
|
92
|
+
*/
|
|
93
|
+
export declare function createDistributedTraceContextFromTrace(telemetryTrace?: ITelemetryTrace, parentCtx?: IDistributedTraceContext): IDistributedTraceContext;
|
|
94
|
+
|
|
77
95
|
export declare function createDomEvent(eventName: string): Event;
|
|
78
96
|
|
|
79
97
|
/**
|
|
@@ -91,15 +109,7 @@ export declare function createTelemetryItem<T>(item: T, baseType: string, envelo
|
|
|
91
109
|
[key: string]: any;
|
|
92
110
|
}): ITelemetryItem;
|
|
93
111
|
|
|
94
|
-
|
|
95
|
-
* Create a new ITraceParent instance using the provided values.
|
|
96
|
-
* @param traceId - The traceId to use, when invalid a new random W3C id will be generated.
|
|
97
|
-
* @param spanId - The parent/span id to use, a new random value will be generated if it is invalid.
|
|
98
|
-
* @param flags - The traceFlags to use, defaults to zero (0) if not supplied or invalid
|
|
99
|
-
* @param version - The version to used, defaults to version "01" if not supplied or invalid.
|
|
100
|
-
* @returns
|
|
101
|
-
*/
|
|
102
|
-
export declare function createTraceParent(traceId?: string, spanId?: string, flags?: number, version?: string): ITraceParent;
|
|
112
|
+
export { createTraceParent }
|
|
103
113
|
|
|
104
114
|
export declare let CtxTagKeys: ContextTagKeys;
|
|
105
115
|
|
|
@@ -446,11 +456,7 @@ export declare const enum FieldType {
|
|
|
446
456
|
Hidden = 4
|
|
447
457
|
}
|
|
448
458
|
|
|
449
|
-
|
|
450
|
-
* Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.
|
|
451
|
-
* @returns
|
|
452
|
-
*/
|
|
453
|
-
export declare function findW3cTraceParent(): ITraceParent;
|
|
459
|
+
export { findW3cTraceParent }
|
|
454
460
|
|
|
455
461
|
/**
|
|
456
462
|
* Formats the provided errorObj for display and reporting, it may be a String, Object, integer or undefined depending on the browser.
|
|
@@ -458,15 +464,7 @@ export declare function findW3cTraceParent(): ITraceParent;
|
|
|
458
464
|
*/
|
|
459
465
|
declare function _formatErrorCode(errorObj: any): any;
|
|
460
466
|
|
|
461
|
-
|
|
462
|
-
* Format the ITraceParent value as a string using the supported and know version formats.
|
|
463
|
-
* So even if the passed traceParent is a later version the string value returned from this
|
|
464
|
-
* function will convert it to only the known version formats.
|
|
465
|
-
* This currently only supports version "00" and invalid "ff"
|
|
466
|
-
* @param value - The parsed traceParent value
|
|
467
|
-
* @returns
|
|
468
|
-
*/
|
|
469
|
-
export declare function formatTraceParent(value: ITraceParent): string;
|
|
467
|
+
export { formatTraceParent }
|
|
470
468
|
|
|
471
469
|
export declare function getExtensionByName(extensions: IPlugin[], identifier: string): IPlugin | null;
|
|
472
470
|
|
|
@@ -1903,12 +1901,7 @@ export declare interface ISession {
|
|
|
1903
1901
|
|
|
1904
1902
|
export declare function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean;
|
|
1905
1903
|
|
|
1906
|
-
|
|
1907
|
-
* Is the parsed traceParent indicating that the trace is currently sampled.
|
|
1908
|
-
* @param value - The parsed traceParent value
|
|
1909
|
-
* @returns
|
|
1910
|
-
*/
|
|
1911
|
-
export declare function isSampledFlag(value: ITraceParent): boolean;
|
|
1904
|
+
export { isSampledFlag }
|
|
1912
1905
|
|
|
1913
1906
|
declare interface IStackDetails {
|
|
1914
1907
|
src: string;
|
|
@@ -1941,30 +1934,11 @@ declare interface IStackFrame {
|
|
|
1941
1934
|
line: number;
|
|
1942
1935
|
}
|
|
1943
1936
|
|
|
1944
|
-
|
|
1945
|
-
* Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
|
|
1946
|
-
* string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
|
|
1947
|
-
* If all characters are zero (0000000000000000) this is considered an invalid value.
|
|
1948
|
-
* @param value - The W3c span id to be validated
|
|
1949
|
-
* @returns true if valid otherwise false
|
|
1950
|
-
*/
|
|
1951
|
-
export declare function isValidSpanId(value: string): boolean;
|
|
1937
|
+
export { isValidSpanId }
|
|
1952
1938
|
|
|
1953
|
-
|
|
1954
|
-
* Is the provided W3c Trace Id a valid string representation, it must be a 32-character string
|
|
1955
|
-
* of lowercase hexadecimal characters for example, 4bf92f3577b34da6a3ce929d0e0e4736.
|
|
1956
|
-
* If all characters as zero (00000000000000000000000000000000) it will be considered an invalid value.
|
|
1957
|
-
* @param value - The W3c trace Id to be validated
|
|
1958
|
-
* @returns true if valid otherwise false
|
|
1959
|
-
*/
|
|
1960
|
-
export declare function isValidTraceId(value: string): boolean;
|
|
1939
|
+
export { isValidTraceId }
|
|
1961
1940
|
|
|
1962
|
-
|
|
1963
|
-
* Validates that the provided ITraceParent instance conforms to the currently supported specifications
|
|
1964
|
-
* @param value
|
|
1965
|
-
* @returns
|
|
1966
|
-
*/
|
|
1967
|
-
export declare function isValidTraceParent(value: ITraceParent): boolean;
|
|
1941
|
+
export { isValidTraceParent }
|
|
1968
1942
|
|
|
1969
1943
|
export declare interface ITelemetryContext {
|
|
1970
1944
|
/**
|
|
@@ -2023,47 +1997,21 @@ export declare interface ITelemetryTrace {
|
|
|
2023
1997
|
*/
|
|
2024
1998
|
parentID?: string;
|
|
2025
1999
|
/**
|
|
2000
|
+
* @deprecated Never Used
|
|
2026
2001
|
* Trace state
|
|
2027
2002
|
*/
|
|
2028
2003
|
traceState?: ITraceState;
|
|
2004
|
+
/**
|
|
2005
|
+
* An integer representation of the W3C TraceContext trace-flags. https://www.w3.org/TR/trace-context/#trace-flags
|
|
2006
|
+
*/
|
|
2007
|
+
traceFlags?: number;
|
|
2029
2008
|
/**
|
|
2030
2009
|
* Name
|
|
2031
2010
|
*/
|
|
2032
2011
|
name?: string;
|
|
2033
2012
|
}
|
|
2034
2013
|
|
|
2035
|
-
|
|
2036
|
-
* This interface represents the components of a W3C traceparent header
|
|
2037
|
-
*/
|
|
2038
|
-
export declare interface ITraceParent {
|
|
2039
|
-
/**
|
|
2040
|
-
* The version of the definition, this MUST be a string with a length of 2 and only contain lowercase
|
|
2041
|
-
* hexadecimal characters. A value of 'ff' is considered to be an invalid version.
|
|
2042
|
-
*/
|
|
2043
|
-
version: string;
|
|
2044
|
-
/**
|
|
2045
|
-
* This is the ID of the whole trace forest and is used to uniquely identify a distributed trace
|
|
2046
|
-
* through a system. It is represented as a 32-character string of lowercase hexadecimal characters,
|
|
2047
|
-
* for example, 4bf92f3577b34da6a3ce929d0e0e4736.
|
|
2048
|
-
* All characters as zero (00000000000000000000000000000000) is considered an invalid value.
|
|
2049
|
-
*/
|
|
2050
|
-
traceId: string;
|
|
2051
|
-
/**
|
|
2052
|
-
* This is the ID of the current request as known by the caller (in some tracing systems, this is also
|
|
2053
|
-
* known as the parent-id, where a span is the execution of a client request). It is represented as an
|
|
2054
|
-
* 16-character string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
|
|
2055
|
-
* All bytes as zero (0000000000000000) is considered an invalid value.
|
|
2056
|
-
*/
|
|
2057
|
-
spanId: string;
|
|
2058
|
-
/**
|
|
2059
|
-
* An 8-bit value of flags that controls tracing such as sampling, trace level, etc. These flags are
|
|
2060
|
-
* recommendations given by the caller rather than strict rules to follow.
|
|
2061
|
-
* As this is a bit field, you cannot interpret flags by decoding the hex value and looking at the resulting
|
|
2062
|
-
* number. For example, a flag 00000001 could be encoded as 01 in hex, or 09 in hex if present with the flag
|
|
2063
|
-
* 00001000. A common mistake in bit fields is forgetting to mask when interpreting flags.
|
|
2064
|
-
*/
|
|
2065
|
-
traceFlags: number;
|
|
2066
|
-
}
|
|
2014
|
+
export { ITraceParent }
|
|
2067
2015
|
|
|
2068
2016
|
export declare interface ITraceState {
|
|
2069
2017
|
}
|
|
@@ -2501,13 +2449,7 @@ export declare class PageViewPerformance implements IPageViewPerfData, ISerializ
|
|
|
2501
2449
|
|
|
2502
2450
|
export declare function parseConnectionString(connectionString?: string): ConnectionString;
|
|
2503
2451
|
|
|
2504
|
-
|
|
2505
|
-
* Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
2506
|
-
*
|
|
2507
|
-
* @param value
|
|
2508
|
-
* @returns
|
|
2509
|
-
*/
|
|
2510
|
-
export declare function parseTraceParent(value: string): ITraceParent;
|
|
2452
|
+
export { parseTraceParent }
|
|
2511
2453
|
|
|
2512
2454
|
export declare const ProcessLegacy = "ProcessLegacy";
|
|
2513
2455
|
|
package/dist-esm/Constants.js
CHANGED
package/dist-esm/Enums.js
CHANGED
package/dist-esm/HelperFuncs.js
CHANGED