@microsoft/applicationinsights-common 2.8.0-nightly.2204-04 → 2.8.0-nightly.2204-07
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 +566 -504
- 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 +1206 -399
- package/dist/applicationinsights-common.api.md +105 -28
- package/dist/applicationinsights-common.d.ts +169 -31
- package/dist/applicationinsights-common.js +566 -504
- 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 +169 -31
- 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 +9 -10
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js.map +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/ITraceParent.js +8 -0
- package/dist-esm/Interfaces/ITraceParent.js.map +1 -0
- 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 +13 -12
- package/dist-esm/RequestResponseHeaders.js.map +1 -1
- package/dist-esm/StorageHelperFuncs.js +12 -12
- package/dist-esm/StorageHelperFuncs.js.map +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 +9 -9
- package/dist-esm/Telemetry/Common/DataSanitizer.js.map +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 +42 -32
- package/dist-esm/TelemetryItemCreator.js.map +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +2 -2
- package/dist-esm/Util.js.map +1 -1
- package/dist-esm/W3cTraceParent.js +192 -0
- package/dist-esm/W3cTraceParent.js.map +1 -0
- package/dist-esm/applicationinsights-common.js +3 -2
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +2 -2
- package/src/Enums.ts +2 -3
- package/src/Interfaces/Contracts/SeverityLevel.ts +15 -2
- package/src/Interfaces/IConfig.ts +2 -9
- package/src/Interfaces/ITraceParent.ts +38 -0
- package/src/RequestResponseHeaders.ts +38 -2
- package/src/StorageHelperFuncs.ts +11 -11
- package/src/Telemetry/Common/DataSanitizer.ts +10 -10
- package/src/Telemetry/PageViewPerformance.ts +1 -1
- package/src/TelemetryItemCreator.ts +56 -44
- package/src/Util.ts +3 -3
- package/src/W3cTraceParent.ts +219 -0
- package/src/applicationinsights-common.ts +8 -3
- package/types/Enums.d.ts +2 -9
- package/types/Interfaces/Contracts/SeverityLevel.d.ts +6 -1
- package/types/Interfaces/IConfig.d.ts +3 -9
- package/types/Interfaces/ITraceParent.d.ts +32 -0
- package/types/RequestResponseHeaders.d.ts +31 -1
- package/types/Telemetry/Common/DataSanitizer.d.ts +3 -3
- package/types/TelemetryItemCreator.d.ts +15 -5
- package/types/W3cTraceParent.d.ts +59 -0
- package/types/applicationinsights-common.d.ts +5 -3
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { ITelemetryItem, IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
2
|
+
/**
|
|
3
|
+
* Create a telemetry item that the 1DS channel understands
|
|
4
|
+
* @param item domain specific properties; part B
|
|
5
|
+
* @param baseType telemetry item type. ie PageViewData
|
|
6
|
+
* @param envelopeName name of the envelope. ie Microsoft.ApplicationInsights.<instrumentation key>.PageView
|
|
7
|
+
* @param customProperties user defined custom properties; part C
|
|
8
|
+
* @param systemProperties system properties that are added to the context; part A
|
|
9
|
+
* @returns ITelemetryItem that is sent to channel
|
|
10
|
+
*/
|
|
11
|
+
export declare function createTelemetryItem<T>(item: T, baseType: string, envelopeName: string, logger: IDiagnosticLogger, customProperties?: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}, systemProperties?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}): ITelemetryItem;
|
|
2
16
|
export declare class TelemetryItemCreator {
|
|
3
17
|
/**
|
|
4
18
|
* Create a telemetry item that the 1DS channel understands
|
|
@@ -9,9 +23,5 @@ export declare class TelemetryItemCreator {
|
|
|
9
23
|
* @param systemProperties system properties that are added to the context; part A
|
|
10
24
|
* @returns ITelemetryItem that is sent to channel
|
|
11
25
|
*/
|
|
12
|
-
static create
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}, systemProperties?: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}): ITelemetryItem;
|
|
26
|
+
static create: typeof createTelemetryItem;
|
|
17
27
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ITraceParent } from "./Interfaces/ITraceParent";
|
|
2
|
+
/**
|
|
3
|
+
* Create a new ITraceParent instance using the provided values.
|
|
4
|
+
* @param traceId - The traceId to use, when invalid a new random W3C id will be generated.
|
|
5
|
+
* @param spanId - The parent/span id to use, a new random value will be generated if it is invalid.
|
|
6
|
+
* @param flags - The traceFlags to use, defaults to zero (0) if not supplied or invalid
|
|
7
|
+
* @param version - The version to used, defaults to version "01" if not supplied or invalid.
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function createTraceParent(traceId?: string, spanId?: string, flags?: number, version?: string): ITraceParent;
|
|
11
|
+
/**
|
|
12
|
+
* Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)
|
|
13
|
+
*
|
|
14
|
+
* @param value
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseTraceParent(value: string): ITraceParent;
|
|
18
|
+
/**
|
|
19
|
+
* Is the provided W3c Trace Id a valid string representation, it must be a 32-character string
|
|
20
|
+
* of lowercase hexadecimal characters for example, 4bf92f3577b34da6a3ce929d0e0e4736.
|
|
21
|
+
* If all characters as zero (00000000000000000000000000000000) it will be considered an invalid value.
|
|
22
|
+
* @param value - The W3c trace Id to be validated
|
|
23
|
+
* @returns true if valid otherwise false
|
|
24
|
+
*/
|
|
25
|
+
export declare function isValidTraceId(value: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
|
|
28
|
+
* string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
|
|
29
|
+
* If all characters are zero (0000000000000000) this is considered an invalid value.
|
|
30
|
+
* @param value - The W3c span id to be validated
|
|
31
|
+
* @returns true if valid otherwise false
|
|
32
|
+
*/
|
|
33
|
+
export declare function isValidSpanId(value: string): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Validates that the provided ITraceParent instance conforms to the currently supported specifications
|
|
36
|
+
* @param value
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
export declare function isValidTraceParent(value: ITraceParent): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Is the parsed traceParent indicating that the trace is currently sampled.
|
|
42
|
+
* @param value - The parsed traceParent value
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
export declare function isSampledFlag(value: ITraceParent): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Format the ITraceParent value as a string using the supported and know version formats.
|
|
48
|
+
* So even if the passed traceParent is a later version the string value returned from this
|
|
49
|
+
* function will convert it to only the known version formats.
|
|
50
|
+
* This currently only supports version "00" and invalid "ff"
|
|
51
|
+
* @param value - The parsed traceParent value
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
export declare function formatTraceParent(value: ITraceParent): string;
|
|
55
|
+
/**
|
|
56
|
+
* Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
export declare function findW3cTraceParent(): ITraceParent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { IUtil, Util, ICorrelationIdHelper, CorrelationIdHelper, IDateTimeUtils, DateTimeUtils, dateTimeUtilsNow, dateTimeUtilsDuration, IUrlHelper, UrlHelper, isInternalApplicationInsightsEndpoint } from "./Util";
|
|
2
2
|
export { parseConnectionString, ConnectionStringParser } from "./ConnectionStringParser";
|
|
3
3
|
export { FieldType } from "./Enums";
|
|
4
|
-
export { IRequestHeaders, RequestHeaders } from "./RequestResponseHeaders";
|
|
4
|
+
export { IRequestHeaders, RequestHeaders, eRequestHeaders } from "./RequestResponseHeaders";
|
|
5
5
|
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from "./Constants";
|
|
6
6
|
export { IData as AIData } from "./Interfaces/Contracts/IData";
|
|
7
7
|
export { IBase as AIBase } from "./Interfaces/Contracts/IBase";
|
|
@@ -24,12 +24,12 @@ export { IPageViewPerformanceTelemetry, IPageViewPerformanceTelemetryInternal }
|
|
|
24
24
|
export { Trace } from "./Telemetry/Trace";
|
|
25
25
|
export { PageViewPerformance } from "./Telemetry/PageViewPerformance";
|
|
26
26
|
export { Data } from "./Telemetry/Common/Data";
|
|
27
|
-
export { SeverityLevel } from "./Interfaces/Contracts/SeverityLevel";
|
|
27
|
+
export { eSeverityLevel, SeverityLevel } from "./Interfaces/Contracts/SeverityLevel";
|
|
28
28
|
export { IConfig, ConfigurationManager } from "./Interfaces/IConfig";
|
|
29
29
|
export { IChannelControlsAI } from "./Interfaces/IChannelControlsAI";
|
|
30
30
|
export { IContextTagKeys, ContextTagKeys } from "./Interfaces/Contracts/ContextTagKeys";
|
|
31
31
|
export { DataSanitizerValues, IDataSanitizer, DataSanitizer, dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from "./Telemetry/Common/DataSanitizer";
|
|
32
|
-
export { TelemetryItemCreator } from "./TelemetryItemCreator";
|
|
32
|
+
export { TelemetryItemCreator, createTelemetryItem } from "./TelemetryItemCreator";
|
|
33
33
|
export { ICorrelationConfig } from "./Interfaces/ICorrelationConfig";
|
|
34
34
|
export { IAppInsights } from "./Interfaces/IAppInsights";
|
|
35
35
|
export { IWeb } from "./Interfaces/Context/IWeb";
|
|
@@ -52,6 +52,8 @@ export { isBeaconsSupported as isBeaconApiSupported } from "@microsoft/applicati
|
|
|
52
52
|
export { createDomEvent } from "./DomHelperFuncs";
|
|
53
53
|
export { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from "./StorageHelperFuncs";
|
|
54
54
|
export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from "./UrlHelperFuncs";
|
|
55
|
+
export { ITraceParent } from "./Interfaces/ITraceParent";
|
|
56
|
+
export { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from "./W3cTraceParent";
|
|
55
57
|
export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
56
58
|
export declare const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
|
|
57
59
|
export declare const AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
|