@microsoft/applicationinsights-common 3.0.0-beta.2208-14 → 3.0.0-beta.2208-16
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/README.md +7 -0
- package/browser/applicationinsights-common.integrity.json +9 -9
- package/browser/applicationinsights-common.js +698 -1416
- 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 +1785 -3953
- package/dist/applicationinsights-common.api.md +13 -137
- package/dist/applicationinsights-common.d.ts +23 -278
- package/dist/applicationinsights-common.js +698 -1416
- 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 +23 -278
- 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 +6 -32
- 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 +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +79 -133
- package/dist-esm/Util.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +4 -8
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-common.js +3 -3
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +5 -4
- package/src/Telemetry/Common/DataSanitizer.ts +5 -95
- package/src/Util.ts +79 -395
- package/src/__DynamicConstants.ts +3 -7
- package/src/applicationinsights-common.ts +3 -4
- package/tsconfig.json +1 -1
- package/types/Telemetry/Common/DataSanitizer.d.ts +0 -50
- package/types/Util.d.ts +19 -212
- package/types/__DynamicConstants.d.ts +0 -4
- package/types/applicationinsights-common.d.ts +2 -2
- package/types/tsdoc-metadata.json +1 -1
|
@@ -60,8 +60,20 @@ export class ContextTagKeys extends ContextTagKeys_base {
|
|
|
60
60
|
constructor();
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
// @public
|
|
64
|
+
export function correlationIdCanIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
|
|
65
|
+
|
|
66
|
+
// @public
|
|
67
|
+
export function correlationIdGetCorrelationContext(responseHeader: string): string;
|
|
68
|
+
|
|
69
|
+
// @public
|
|
70
|
+
export function correlationIdGetCorrelationContextValue(responseHeader: string, key: string): string;
|
|
71
|
+
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export function correlationIdGetPrefix(): string;
|
|
74
|
+
|
|
63
75
|
// @public (undocumented)
|
|
64
|
-
export
|
|
76
|
+
export function correlationIdSetPrefix(prefix: string): void;
|
|
65
77
|
|
|
66
78
|
// @public
|
|
67
79
|
export function createDistributedTraceContextFromTrace(telemetryTrace?: ITelemetryTrace, parentCtx?: IDistributedTraceContext): IDistributedTraceContext;
|
|
@@ -116,9 +128,6 @@ export function dataSanitizeMessage(logger: IDiagnosticLogger, message: any): an
|
|
|
116
128
|
// @public (undocumented)
|
|
117
129
|
export function dataSanitizeProperties(logger: IDiagnosticLogger, properties: any): any;
|
|
118
130
|
|
|
119
|
-
// @public
|
|
120
|
-
export const DataSanitizer: IDataSanitizer;
|
|
121
|
-
|
|
122
131
|
// @public (undocumented)
|
|
123
132
|
export const enum DataSanitizerValues {
|
|
124
133
|
MAX_EXCEPTION_LENGTH = 32768,
|
|
@@ -136,9 +145,6 @@ export function dataSanitizeString(logger: IDiagnosticLogger, value: any, maxLen
|
|
|
136
145
|
// @public (undocumented)
|
|
137
146
|
export function dataSanitizeUrl(logger: IDiagnosticLogger, url: any): any;
|
|
138
147
|
|
|
139
|
-
// @public
|
|
140
|
-
export const DateTimeUtils: IDateTimeUtils;
|
|
141
|
-
|
|
142
148
|
// @public (undocumented)
|
|
143
149
|
export function dateTimeUtilsDuration(start: number, end: number): number;
|
|
144
150
|
|
|
@@ -577,63 +583,6 @@ export interface ICorrelationConfig {
|
|
|
577
583
|
maxAjaxPerfLookupAttempts?: number;
|
|
578
584
|
}
|
|
579
585
|
|
|
580
|
-
// @public (undocumented)
|
|
581
|
-
export interface ICorrelationIdHelper {
|
|
582
|
-
canIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
|
|
583
|
-
// (undocumented)
|
|
584
|
-
correlationIdPrefix: string;
|
|
585
|
-
getCorrelationContext(responseHeader: string): string | undefined;
|
|
586
|
-
getCorrelationContextValue(responseHeader: string, key: string): string | undefined;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
// @public (undocumented)
|
|
590
|
-
export interface IDataSanitizer {
|
|
591
|
-
MAX_EXCEPTION_LENGTH: number;
|
|
592
|
-
MAX_ID_LENGTH: number;
|
|
593
|
-
MAX_MESSAGE_LENGTH: number;
|
|
594
|
-
MAX_NAME_LENGTH: number;
|
|
595
|
-
MAX_PROPERTY_LENGTH: number;
|
|
596
|
-
MAX_STRING_LENGTH: number;
|
|
597
|
-
MAX_URL_LENGTH: number;
|
|
598
|
-
// (undocumented)
|
|
599
|
-
padNumber: (num: number) => string;
|
|
600
|
-
// Warning: (ae-forgotten-export) The symbol "_DYN_SANITIZE_EXCEPTION" needs to be exported by the entry point applicationinsights-common.d.ts
|
|
601
|
-
//
|
|
602
|
-
// (undocumented)
|
|
603
|
-
[_DYN_SANITIZE_EXCEPTION]: (logger: IDiagnosticLogger, exception: any) => string;
|
|
604
|
-
// (undocumented)
|
|
605
|
-
sanitizeId: (logger: IDiagnosticLogger, id: string) => string;
|
|
606
|
-
// (undocumented)
|
|
607
|
-
sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) => any;
|
|
608
|
-
// (undocumented)
|
|
609
|
-
sanitizeKey: (logger: IDiagnosticLogger, name: any) => string;
|
|
610
|
-
// Warning: (ae-forgotten-export) The symbol "_DYN_SANITIZE_KEY_AND_ADD2" needs to be exported by the entry point applicationinsights-common.d.ts
|
|
611
|
-
//
|
|
612
|
-
// (undocumented)
|
|
613
|
-
[_DYN_SANITIZE_KEY_AND_ADD2]: (logger: IDiagnosticLogger, key: any, map: any) => string;
|
|
614
|
-
// Warning: (ae-forgotten-export) The symbol "_DYN_SANITIZE_MEASUREMENT3" needs to be exported by the entry point applicationinsights-common.d.ts
|
|
615
|
-
//
|
|
616
|
-
// (undocumented)
|
|
617
|
-
[_DYN_SANITIZE_MEASUREMENT3]: (logger: IDiagnosticLogger, measurements: any) => any;
|
|
618
|
-
// (undocumented)
|
|
619
|
-
sanitizeMessage: (logger: IDiagnosticLogger, message: any) => string;
|
|
620
|
-
// Warning: (ae-forgotten-export) The symbol "_DYN_SANITIZE_PROPERTIES" needs to be exported by the entry point applicationinsights-common.d.ts
|
|
621
|
-
//
|
|
622
|
-
// (undocumented)
|
|
623
|
-
[_DYN_SANITIZE_PROPERTIES]: (logger: IDiagnosticLogger, properties: any) => any;
|
|
624
|
-
// (undocumented)
|
|
625
|
-
sanitizeString: (logger: IDiagnosticLogger, value: any, maxLength?: number) => string;
|
|
626
|
-
// (undocumented)
|
|
627
|
-
sanitizeUrl: (logger: IDiagnosticLogger, url: any) => string;
|
|
628
|
-
trim: (str: any) => string;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
// @public (undocumented)
|
|
632
|
-
export interface IDateTimeUtils {
|
|
633
|
-
GetDuration: (start: number, end: number) => number;
|
|
634
|
-
Now: () => number;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
586
|
// Warning: (ae-forgotten-export) The symbol "IPartC" needs to be exported by the entry point applicationinsights-common.d.ts
|
|
638
587
|
//
|
|
639
588
|
// @public
|
|
@@ -900,21 +849,6 @@ export interface ITraceTelemetry extends IPartC {
|
|
|
900
849
|
severityLevel?: SeverityLevel;
|
|
901
850
|
}
|
|
902
851
|
|
|
903
|
-
// @public (undocumented)
|
|
904
|
-
export interface IUrlHelper {
|
|
905
|
-
// (undocumented)
|
|
906
|
-
getAbsoluteUrl: (url: string) => string;
|
|
907
|
-
// (undocumented)
|
|
908
|
-
getCompleteUrl: (method: string, absoluteUrl: string) => string;
|
|
909
|
-
// (undocumented)
|
|
910
|
-
getPathName: (url: string) => string;
|
|
911
|
-
parseFullHost: (url: string, inclPort?: boolean) => string;
|
|
912
|
-
// (undocumented)
|
|
913
|
-
parseHost: (url: string, inclPort?: boolean) => string;
|
|
914
|
-
// (undocumented)
|
|
915
|
-
parseUrl: (url: string) => HTMLAnchorElement;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
852
|
// @public (undocumented)
|
|
919
853
|
export interface IUser {
|
|
920
854
|
accountAcquisitionDate: string;
|
|
@@ -937,58 +871,6 @@ export interface IUserContext extends IUser {
|
|
|
937
871
|
update(userId?: string): void;
|
|
938
872
|
}
|
|
939
873
|
|
|
940
|
-
// @public (undocumented)
|
|
941
|
-
export interface IUtil {
|
|
942
|
-
addEventHandler: (obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture: boolean) => boolean;
|
|
943
|
-
// @deprecated (undocumented)
|
|
944
|
-
canUseCookies: (logger: IDiagnosticLogger) => any;
|
|
945
|
-
canUseLocalStorage: () => boolean;
|
|
946
|
-
canUseSessionStorage: () => boolean;
|
|
947
|
-
// (undocumented)
|
|
948
|
-
createDomEvent: (eventName: string) => Event;
|
|
949
|
-
// @deprecated (undocumented)
|
|
950
|
-
deleteCookie: (logger: IDiagnosticLogger, name: string) => void;
|
|
951
|
-
// @deprecated (undocumented)
|
|
952
|
-
disableCookies: () => void;
|
|
953
|
-
// (undocumented)
|
|
954
|
-
disableStorage: () => void;
|
|
955
|
-
// (undocumented)
|
|
956
|
-
disallowsSameSiteNone: (userAgent: string) => boolean;
|
|
957
|
-
dump: (object: any) => string;
|
|
958
|
-
generateW3CId: () => string;
|
|
959
|
-
// @deprecated (undocumented)
|
|
960
|
-
getCookie: (logger: IDiagnosticLogger, name: string) => string;
|
|
961
|
-
getExceptionName: (object: any) => string;
|
|
962
|
-
// (undocumented)
|
|
963
|
-
getExtension: (extensions: IPlugin[], identifier: string) => IPlugin | null;
|
|
964
|
-
getIEVersion: (userAgentStr?: string) => number;
|
|
965
|
-
getSessionStorage: (logger: IDiagnosticLogger, name: string) => string;
|
|
966
|
-
getSessionStorageKeys: () => string[];
|
|
967
|
-
getStorage: (logger: IDiagnosticLogger, name: string) => string;
|
|
968
|
-
isArray: (obj: any) => boolean;
|
|
969
|
-
IsBeaconApiSupported: () => boolean;
|
|
970
|
-
isCrossOriginError: (message: string | Event, url: string, lineNumber: number, columnNumber: number, error: Error) => boolean;
|
|
971
|
-
isDate: (obj: any) => obj is Date;
|
|
972
|
-
isError: (obj: any) => obj is Error;
|
|
973
|
-
isInternalApplicationInsightsEndpoint: (endpointUrl: string) => boolean;
|
|
974
|
-
msToTimeSpan: (totalms: number) => string;
|
|
975
|
-
newId: () => string;
|
|
976
|
-
// (undocumented)
|
|
977
|
-
NotSpecified: string;
|
|
978
|
-
random32: () => number;
|
|
979
|
-
removeSessionStorage: (logger: IDiagnosticLogger, name: string) => boolean;
|
|
980
|
-
removeStorage: (logger: IDiagnosticLogger, name: string) => boolean;
|
|
981
|
-
// @deprecated (undocumented)
|
|
982
|
-
setCookie: (logger: IDiagnosticLogger, name: string, value: string, domain?: string) => void;
|
|
983
|
-
setSessionStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean;
|
|
984
|
-
setStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean;
|
|
985
|
-
// (undocumented)
|
|
986
|
-
stringToBoolOrDefault: (str: any, defaultValue?: boolean) => boolean;
|
|
987
|
-
// (undocumented)
|
|
988
|
-
toISOStringForIE8: (date: Date) => string;
|
|
989
|
-
trim: (str: any) => string;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
874
|
// @public (undocumented)
|
|
993
875
|
export interface IWeb {
|
|
994
876
|
browser: string;
|
|
@@ -1233,9 +1115,6 @@ export function urlGetCompleteUrl(method: string, absoluteUrl: string): string;
|
|
|
1233
1115
|
// @public (undocumented)
|
|
1234
1116
|
export function urlGetPathName(url: string): string;
|
|
1235
1117
|
|
|
1236
|
-
// @public (undocumented)
|
|
1237
|
-
export const UrlHelper: IUrlHelper;
|
|
1238
|
-
|
|
1239
1118
|
// @public (undocumented)
|
|
1240
1119
|
export function urlParseFullHost(url: string, inclPort?: boolean): string;
|
|
1241
1120
|
|
|
@@ -1245,9 +1124,6 @@ export function urlParseHost(url: string, inclPort?: boolean): string;
|
|
|
1245
1124
|
// @public (undocumented)
|
|
1246
1125
|
export function urlParseUrl(url: string): HTMLAnchorElement;
|
|
1247
1126
|
|
|
1248
|
-
// @public (undocumented)
|
|
1249
|
-
export const Util: IUtil;
|
|
1250
|
-
|
|
1251
1127
|
// @public
|
|
1252
1128
|
export function utlCanUseLocalStorage(reset?: boolean): boolean;
|
|
1253
1129
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Common JavaScript Library, 3.0.0-beta.2208-
|
|
2
|
+
* Microsoft Application Insights Common JavaScript Library, 3.0.0-beta.2208-16
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -76,7 +76,28 @@ declare namespace ApplicationInsights {
|
|
|
76
76
|
|
|
77
77
|
const ContextTagKeys_base: new () => IContextTagKeys;
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.
|
|
81
|
+
* Headers are always included if the current domain matches the request domain. If they do not match (CORS),
|
|
82
|
+
* they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.
|
|
83
|
+
* Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must
|
|
84
|
+
* manually supply domains to include correlation headers on. Else, no headers will be included at all.
|
|
85
|
+
*/
|
|
86
|
+
function correlationIdCanIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Combines target appId and target role name from response header.
|
|
90
|
+
*/
|
|
91
|
+
function correlationIdGetCorrelationContext(responseHeader: string): string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Gets key from correlation response header
|
|
95
|
+
*/
|
|
96
|
+
function correlationIdGetCorrelationContextValue(responseHeader: string, key: string): string;
|
|
97
|
+
|
|
98
|
+
function correlationIdGetPrefix(): string;
|
|
99
|
+
|
|
100
|
+
function correlationIdSetPrefix(prefix: string): void;
|
|
80
101
|
|
|
81
102
|
/**
|
|
82
103
|
* Creates a IDistributedTraceContext from an optional telemetryTrace
|
|
@@ -196,11 +217,6 @@ declare namespace ApplicationInsights {
|
|
|
196
217
|
|
|
197
218
|
function dataSanitizeProperties(logger: IDiagnosticLogger, properties: any): any;
|
|
198
219
|
|
|
199
|
-
/**
|
|
200
|
-
* Provides the DataSanitizer functions within the previous namespace.
|
|
201
|
-
*/
|
|
202
|
-
const DataSanitizer: IDataSanitizer;
|
|
203
|
-
|
|
204
220
|
const enum DataSanitizerValues {
|
|
205
221
|
/**
|
|
206
222
|
* Max length allowed for custom names.
|
|
@@ -236,11 +252,6 @@ declare namespace ApplicationInsights {
|
|
|
236
252
|
|
|
237
253
|
function dataSanitizeUrl(logger: IDiagnosticLogger, url: any): any;
|
|
238
254
|
|
|
239
|
-
/**
|
|
240
|
-
* A utility class that helps getting time related parameters
|
|
241
|
-
*/
|
|
242
|
-
const DateTimeUtils: IDateTimeUtils;
|
|
243
|
-
|
|
244
255
|
function dateTimeUtilsDuration(start: number, end: number): number;
|
|
245
256
|
|
|
246
257
|
function dateTimeUtilsNow(): number;
|
|
@@ -264,14 +275,6 @@ declare namespace ApplicationInsights {
|
|
|
264
275
|
|
|
265
276
|
function dsPadNumber(num: number): string;
|
|
266
277
|
|
|
267
|
-
const _DYN_SANITIZE_EXCEPTION = "sanitizeException";
|
|
268
|
-
|
|
269
|
-
const _DYN_SANITIZE_KEY_AND_ADD2 = "sanitizeKeyAndAddUniqueness";
|
|
270
|
-
|
|
271
|
-
const _DYN_SANITIZE_MEASUREMENT3 = "sanitizeMeasurements";
|
|
272
|
-
|
|
273
|
-
const _DYN_SANITIZE_PROPERTIES = "sanitizeProperties";
|
|
274
|
-
|
|
275
278
|
const enum eDistributedTracingModes {
|
|
276
279
|
/**
|
|
277
280
|
* (Default) Send Application Insights correlation headers
|
|
@@ -1113,26 +1116,6 @@ declare namespace ApplicationInsights {
|
|
|
1113
1116
|
addRequestContext?: (requestContext?: IRequestContext) => ICustomProperties;
|
|
1114
1117
|
}
|
|
1115
1118
|
|
|
1116
|
-
interface ICorrelationIdHelper {
|
|
1117
|
-
correlationIdPrefix: string;
|
|
1118
|
-
/**
|
|
1119
|
-
* Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.
|
|
1120
|
-
* Headers are always included if the current domain matches the request domain. If they do not match (CORS),
|
|
1121
|
-
* they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.
|
|
1122
|
-
* Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must
|
|
1123
|
-
* manually supply domains to include correlation headers on. Else, no headers will be included at all.
|
|
1124
|
-
*/
|
|
1125
|
-
canIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
|
|
1126
|
-
/**
|
|
1127
|
-
* Combines target appId and target role name from response header.
|
|
1128
|
-
*/
|
|
1129
|
-
getCorrelationContext(responseHeader: string): string | undefined;
|
|
1130
|
-
/**
|
|
1131
|
-
* Gets key from correlation response header
|
|
1132
|
-
*/
|
|
1133
|
-
getCorrelationContextValue(responseHeader: string, key: string): string | undefined;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
1119
|
/**
|
|
1137
1120
|
* Metric data single measurement.
|
|
1138
1121
|
*/
|
|
@@ -1167,63 +1150,6 @@ declare namespace ApplicationInsights {
|
|
|
1167
1150
|
stdDev: number;
|
|
1168
1151
|
}
|
|
1169
1152
|
|
|
1170
|
-
interface IDataSanitizer {
|
|
1171
|
-
/**
|
|
1172
|
-
* Max length allowed for custom names.
|
|
1173
|
-
*/
|
|
1174
|
-
MAX_NAME_LENGTH: number;
|
|
1175
|
-
/**
|
|
1176
|
-
* Max length allowed for Id field in page views.
|
|
1177
|
-
*/
|
|
1178
|
-
MAX_ID_LENGTH: number;
|
|
1179
|
-
/**
|
|
1180
|
-
* Max length allowed for custom values.
|
|
1181
|
-
*/
|
|
1182
|
-
MAX_PROPERTY_LENGTH: number;
|
|
1183
|
-
/**
|
|
1184
|
-
* Max length allowed for names
|
|
1185
|
-
*/
|
|
1186
|
-
MAX_STRING_LENGTH: number;
|
|
1187
|
-
/**
|
|
1188
|
-
* Max length allowed for url.
|
|
1189
|
-
*/
|
|
1190
|
-
MAX_URL_LENGTH: number;
|
|
1191
|
-
/**
|
|
1192
|
-
* Max length allowed for messages.
|
|
1193
|
-
*/
|
|
1194
|
-
MAX_MESSAGE_LENGTH: number;
|
|
1195
|
-
/**
|
|
1196
|
-
* Max length allowed for exceptions.
|
|
1197
|
-
*/
|
|
1198
|
-
MAX_EXCEPTION_LENGTH: number;
|
|
1199
|
-
[_DYN_SANITIZE_KEY_AND_ADD2]: (logger: IDiagnosticLogger, key: any, map: any) => string;
|
|
1200
|
-
sanitizeKey: (logger: IDiagnosticLogger, name: any) => string;
|
|
1201
|
-
sanitizeString: (logger: IDiagnosticLogger, value: any, maxLength?: number) => string;
|
|
1202
|
-
sanitizeUrl: (logger: IDiagnosticLogger, url: any) => string;
|
|
1203
|
-
sanitizeMessage: (logger: IDiagnosticLogger, message: any) => string;
|
|
1204
|
-
[_DYN_SANITIZE_EXCEPTION]: (logger: IDiagnosticLogger, exception: any) => string;
|
|
1205
|
-
[_DYN_SANITIZE_PROPERTIES]: (logger: IDiagnosticLogger, properties: any) => any;
|
|
1206
|
-
[_DYN_SANITIZE_MEASUREMENT3]: (logger: IDiagnosticLogger, measurements: any) => any;
|
|
1207
|
-
sanitizeId: (logger: IDiagnosticLogger, id: string) => string;
|
|
1208
|
-
sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) => any;
|
|
1209
|
-
padNumber: (num: number) => string;
|
|
1210
|
-
/**
|
|
1211
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
1212
|
-
*/
|
|
1213
|
-
trim: (str: any) => string;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
interface IDateTimeUtils {
|
|
1217
|
-
/**
|
|
1218
|
-
* Get the number of milliseconds since 1970/01/01 in local timezone
|
|
1219
|
-
*/
|
|
1220
|
-
Now: () => number;
|
|
1221
|
-
/**
|
|
1222
|
-
* Gets duration between two timestamps
|
|
1223
|
-
*/
|
|
1224
|
-
GetDuration: (start: number, end: number) => number;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
1153
|
/**
|
|
1228
1154
|
* DependencyTelemetry telemetry interface
|
|
1229
1155
|
*/
|
|
@@ -2041,18 +1967,6 @@ declare namespace ApplicationInsights {
|
|
|
2041
1967
|
iKey?: string;
|
|
2042
1968
|
}
|
|
2043
1969
|
|
|
2044
|
-
interface IUrlHelper {
|
|
2045
|
-
parseUrl: (url: string) => HTMLAnchorElement;
|
|
2046
|
-
getAbsoluteUrl: (url: string) => string;
|
|
2047
|
-
getPathName: (url: string) => string;
|
|
2048
|
-
getCompleteUrl: (method: string, absoluteUrl: string) => string;
|
|
2049
|
-
parseHost: (url: string, inclPort?: boolean) => string;
|
|
2050
|
-
/**
|
|
2051
|
-
* Get the full host from the url, optionally including the port
|
|
2052
|
-
*/
|
|
2053
|
-
parseFullHost: (url: string, inclPort?: boolean) => string;
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
1970
|
interface IUser {
|
|
2057
1971
|
/**
|
|
2058
1972
|
* The telemetry configuration.
|
|
@@ -2094,171 +2008,6 @@ declare namespace ApplicationInsights {
|
|
|
2094
2008
|
update(userId?: string): void;
|
|
2095
2009
|
}
|
|
2096
2010
|
|
|
2097
|
-
interface IUtil {
|
|
2098
|
-
NotSpecified: string;
|
|
2099
|
-
createDomEvent: (eventName: string) => Event;
|
|
2100
|
-
disableStorage: () => void;
|
|
2101
|
-
/**
|
|
2102
|
-
* Checks if endpoint URL is application insights internal injestion service URL.
|
|
2103
|
-
*
|
|
2104
|
-
* @param endpointUrl Endpoint URL to check.
|
|
2105
|
-
* @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.
|
|
2106
|
-
*/
|
|
2107
|
-
isInternalApplicationInsightsEndpoint: (endpointUrl: string) => boolean;
|
|
2108
|
-
/**
|
|
2109
|
-
* Check if the browser supports local storage.
|
|
2110
|
-
*
|
|
2111
|
-
* @returns {boolean} True if local storage is supported.
|
|
2112
|
-
*/
|
|
2113
|
-
canUseLocalStorage: () => boolean;
|
|
2114
|
-
/**
|
|
2115
|
-
* Get an object from the browser's local storage
|
|
2116
|
-
*
|
|
2117
|
-
* @param {string} name - the name of the object to get from storage
|
|
2118
|
-
* @returns {string} The contents of the storage object with the given name. Null if storage is not supported.
|
|
2119
|
-
*/
|
|
2120
|
-
getStorage: (logger: IDiagnosticLogger, name: string) => string;
|
|
2121
|
-
/**
|
|
2122
|
-
* Set the contents of an object in the browser's local storage
|
|
2123
|
-
*
|
|
2124
|
-
* @param {string} name - the name of the object to set in storage
|
|
2125
|
-
* @param {string} data - the contents of the object to set in storage
|
|
2126
|
-
* @returns {boolean} True if the storage object could be written.
|
|
2127
|
-
*/
|
|
2128
|
-
setStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean;
|
|
2129
|
-
/**
|
|
2130
|
-
* Remove an object from the browser's local storage
|
|
2131
|
-
*
|
|
2132
|
-
* @param {string} name - the name of the object to remove from storage
|
|
2133
|
-
* @returns {boolean} True if the storage object could be removed.
|
|
2134
|
-
*/
|
|
2135
|
-
removeStorage: (logger: IDiagnosticLogger, name: string) => boolean;
|
|
2136
|
-
/**
|
|
2137
|
-
* Check if the browser supports session storage.
|
|
2138
|
-
*
|
|
2139
|
-
* @returns {boolean} True if session storage is supported.
|
|
2140
|
-
*/
|
|
2141
|
-
canUseSessionStorage: () => boolean;
|
|
2142
|
-
/**
|
|
2143
|
-
* Gets the list of session storage keys
|
|
2144
|
-
*
|
|
2145
|
-
* @returns {string[]} List of session storage keys
|
|
2146
|
-
*/
|
|
2147
|
-
getSessionStorageKeys: () => string[];
|
|
2148
|
-
/**
|
|
2149
|
-
* Get an object from the browser's session storage
|
|
2150
|
-
*
|
|
2151
|
-
* @param {string} name - the name of the object to get from storage
|
|
2152
|
-
* @returns {string} The contents of the storage object with the given name. Null if storage is not supported.
|
|
2153
|
-
*/
|
|
2154
|
-
getSessionStorage: (logger: IDiagnosticLogger, name: string) => string;
|
|
2155
|
-
/**
|
|
2156
|
-
* Set the contents of an object in the browser's session storage
|
|
2157
|
-
*
|
|
2158
|
-
* @param {string} name - the name of the object to set in storage
|
|
2159
|
-
* @param {string} data - the contents of the object to set in storage
|
|
2160
|
-
* @returns {boolean} True if the storage object could be written.
|
|
2161
|
-
*/
|
|
2162
|
-
setSessionStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean;
|
|
2163
|
-
/**
|
|
2164
|
-
* Remove an object from the browser's session storage
|
|
2165
|
-
*
|
|
2166
|
-
* @param {string} name - the name of the object to remove from storage
|
|
2167
|
-
* @returns {boolean} True if the storage object could be removed.
|
|
2168
|
-
*/
|
|
2169
|
-
removeSessionStorage: (logger: IDiagnosticLogger, name: string) => boolean;
|
|
2170
|
-
/**
|
|
2171
|
-
* @deprecated - Use the core.getCookieMgr().disable()
|
|
2172
|
-
* Force the SDK not to store and read any data from cookies.
|
|
2173
|
-
*/
|
|
2174
|
-
disableCookies: () => void;
|
|
2175
|
-
/**
|
|
2176
|
-
* @deprecated - Use the core.getCookieMgr().isEnabled()
|
|
2177
|
-
* Helper method to tell if document.cookie object is available and whether it can be used.
|
|
2178
|
-
*/
|
|
2179
|
-
canUseCookies: (logger: IDiagnosticLogger) => any;
|
|
2180
|
-
disallowsSameSiteNone: (userAgent: string) => boolean;
|
|
2181
|
-
/**
|
|
2182
|
-
* @deprecated - Use the core.getCookieMgr().set()
|
|
2183
|
-
* helper method to set userId and sessionId cookie
|
|
2184
|
-
*/
|
|
2185
|
-
setCookie: (logger: IDiagnosticLogger, name: string, value: string, domain?: string) => void;
|
|
2186
|
-
stringToBoolOrDefault: (str: any, defaultValue?: boolean) => boolean;
|
|
2187
|
-
/**
|
|
2188
|
-
* @deprecated - Use the core.getCookieMgr().get()
|
|
2189
|
-
* helper method to access userId and sessionId cookie
|
|
2190
|
-
*/
|
|
2191
|
-
getCookie: (logger: IDiagnosticLogger, name: string) => string;
|
|
2192
|
-
/**
|
|
2193
|
-
* @deprecated - Use the core.getCookieMgr().del()
|
|
2194
|
-
* Deletes a cookie by setting it's expiration time in the past.
|
|
2195
|
-
* @param name - The name of the cookie to delete.
|
|
2196
|
-
*/
|
|
2197
|
-
deleteCookie: (logger: IDiagnosticLogger, name: string) => void;
|
|
2198
|
-
/**
|
|
2199
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
2200
|
-
*/
|
|
2201
|
-
trim: (str: any) => string;
|
|
2202
|
-
/**
|
|
2203
|
-
* generate random id string
|
|
2204
|
-
*/
|
|
2205
|
-
newId: () => string;
|
|
2206
|
-
/**
|
|
2207
|
-
* generate a random 32bit number (-0x80000000..0x7FFFFFFF).
|
|
2208
|
-
*/
|
|
2209
|
-
random32: () => number;
|
|
2210
|
-
/**
|
|
2211
|
-
* generate W3C trace id
|
|
2212
|
-
*/
|
|
2213
|
-
generateW3CId: () => string;
|
|
2214
|
-
/**
|
|
2215
|
-
* Check if an object is of type Array
|
|
2216
|
-
*/
|
|
2217
|
-
isArray: (obj: any) => boolean;
|
|
2218
|
-
/**
|
|
2219
|
-
* Check if an object is of type Error
|
|
2220
|
-
*/
|
|
2221
|
-
isError: (obj: any) => obj is Error;
|
|
2222
|
-
/**
|
|
2223
|
-
* Check if an object is of type Date
|
|
2224
|
-
*/
|
|
2225
|
-
isDate: (obj: any) => obj is Date;
|
|
2226
|
-
toISOStringForIE8: (date: Date) => string;
|
|
2227
|
-
/**
|
|
2228
|
-
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
|
|
2229
|
-
*/
|
|
2230
|
-
getIEVersion: (userAgentStr?: string) => number;
|
|
2231
|
-
/**
|
|
2232
|
-
* Convert ms to c# time span format
|
|
2233
|
-
*/
|
|
2234
|
-
msToTimeSpan: (totalms: number) => string;
|
|
2235
|
-
/**
|
|
2236
|
-
* Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error
|
|
2237
|
-
* happens in a script from other domain (cross origin, CORS).
|
|
2238
|
-
*/
|
|
2239
|
-
isCrossOriginError: (message: string | Event, url: string, lineNumber: number, columnNumber: number, error: Error) => boolean;
|
|
2240
|
-
/**
|
|
2241
|
-
* Returns string representation of an object suitable for diagnostics logging.
|
|
2242
|
-
*/
|
|
2243
|
-
dump: (object: any) => string;
|
|
2244
|
-
/**
|
|
2245
|
-
* Returns the name of object if it's an Error. Otherwise, returns empty string.
|
|
2246
|
-
*/
|
|
2247
|
-
getExceptionName: (object: any) => string;
|
|
2248
|
-
/**
|
|
2249
|
-
* Adds an event handler for the specified event to the window
|
|
2250
|
-
* @param eventName {string} - The name of the event
|
|
2251
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
2252
|
-
* @return {boolean} - true if the handler was successfully added
|
|
2253
|
-
*/
|
|
2254
|
-
addEventHandler: (obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture: boolean) => boolean;
|
|
2255
|
-
/**
|
|
2256
|
-
* Tells if a browser supports a Beacon API
|
|
2257
|
-
*/
|
|
2258
|
-
IsBeaconApiSupported: () => boolean;
|
|
2259
|
-
getExtension: (extensions: IPlugin[], identifier: string) => IPlugin | null;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
2011
|
interface IWeb {
|
|
2263
2012
|
/**
|
|
2264
2013
|
* Browser name, set at ingestion
|
|
@@ -2625,16 +2374,12 @@ declare namespace ApplicationInsights {
|
|
|
2625
2374
|
|
|
2626
2375
|
function urlGetPathName(url: string): string;
|
|
2627
2376
|
|
|
2628
|
-
const UrlHelper: IUrlHelper;
|
|
2629
|
-
|
|
2630
2377
|
function urlParseFullHost(url: string, inclPort?: boolean): string;
|
|
2631
2378
|
|
|
2632
2379
|
function urlParseHost(url: string, inclPort?: boolean): string;
|
|
2633
2380
|
|
|
2634
2381
|
function urlParseUrl(url: string): HTMLAnchorElement;
|
|
2635
2382
|
|
|
2636
|
-
const Util: IUtil;
|
|
2637
|
-
|
|
2638
2383
|
/**
|
|
2639
2384
|
* Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
|
|
2640
2385
|
* any previous disable calls.
|