@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.
Files changed (118) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +566 -504
  3. package/browser/applicationinsights-common.js.map +1 -1
  4. package/browser/applicationinsights-common.min.js +2 -2
  5. package/browser/applicationinsights-common.min.js.map +1 -1
  6. package/dist/applicationinsights-common.api.json +1206 -399
  7. package/dist/applicationinsights-common.api.md +105 -28
  8. package/dist/applicationinsights-common.d.ts +169 -31
  9. package/dist/applicationinsights-common.js +566 -504
  10. package/dist/applicationinsights-common.js.map +1 -1
  11. package/dist/applicationinsights-common.min.js +2 -2
  12. package/dist/applicationinsights-common.min.js.map +1 -1
  13. package/dist/applicationinsights-common.rollup.d.ts +169 -31
  14. package/dist-esm/ConnectionStringParser.js +1 -1
  15. package/dist-esm/Constants.js +1 -1
  16. package/dist-esm/DomHelperFuncs.js +1 -1
  17. package/dist-esm/Enums.js +1 -1
  18. package/dist-esm/HelperFuncs.js +1 -1
  19. package/dist-esm/Interfaces/ConnectionString.js +1 -1
  20. package/dist-esm/Interfaces/Context/IApplication.js +1 -1
  21. package/dist-esm/Interfaces/Context/IDevice.js +1 -1
  22. package/dist-esm/Interfaces/Context/IInternal.js +1 -1
  23. package/dist-esm/Interfaces/Context/ILocation.js +1 -1
  24. package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
  25. package/dist-esm/Interfaces/Context/ISample.js +1 -1
  26. package/dist-esm/Interfaces/Context/ISession.js +1 -1
  27. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
  28. package/dist-esm/Interfaces/Context/IUser.js +1 -1
  29. package/dist-esm/Interfaces/Context/IWeb.js +1 -1
  30. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +1 -1
  31. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
  32. package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
  33. package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
  34. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
  35. package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
  36. package/dist-esm/Interfaces/Contracts/IData.js +1 -1
  37. package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
  38. package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
  39. package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
  40. package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
  41. package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
  42. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
  43. package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
  44. package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
  45. package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
  46. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  47. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  48. package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
  49. package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
  50. package/dist-esm/Interfaces/Contracts/SeverityLevel.js +9 -10
  51. package/dist-esm/Interfaces/Contracts/SeverityLevel.js.map +1 -1
  52. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  53. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  54. package/dist-esm/Interfaces/IConfig.js +1 -1
  55. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  56. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  57. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  58. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  59. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  60. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  61. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  62. package/dist-esm/Interfaces/IPartC.js +1 -1
  63. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  64. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  65. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  66. package/dist-esm/Interfaces/ITraceParent.js +8 -0
  67. package/dist-esm/Interfaces/ITraceParent.js.map +1 -0
  68. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  69. package/dist-esm/Interfaces/PartAExtensions.js +1 -1
  70. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  71. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  72. package/dist-esm/RequestResponseHeaders.js +13 -12
  73. package/dist-esm/RequestResponseHeaders.js.map +1 -1
  74. package/dist-esm/StorageHelperFuncs.js +12 -12
  75. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  76. package/dist-esm/Telemetry/Common/Data.js +1 -1
  77. package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
  78. package/dist-esm/Telemetry/Common/DataSanitizer.js +9 -9
  79. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  80. package/dist-esm/Telemetry/Common/Envelope.js +1 -1
  81. package/dist-esm/Telemetry/Event.js +1 -1
  82. package/dist-esm/Telemetry/Exception.js +1 -1
  83. package/dist-esm/Telemetry/Metric.js +1 -1
  84. package/dist-esm/Telemetry/PageView.js +1 -1
  85. package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
  86. package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
  87. package/dist-esm/Telemetry/Trace.js +1 -1
  88. package/dist-esm/TelemetryItemCreator.js +42 -32
  89. package/dist-esm/TelemetryItemCreator.js.map +1 -1
  90. package/dist-esm/UrlHelperFuncs.js +1 -1
  91. package/dist-esm/Util.js +2 -2
  92. package/dist-esm/Util.js.map +1 -1
  93. package/dist-esm/W3cTraceParent.js +192 -0
  94. package/dist-esm/W3cTraceParent.js.map +1 -0
  95. package/dist-esm/applicationinsights-common.js +3 -2
  96. package/dist-esm/applicationinsights-common.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/Enums.ts +2 -3
  99. package/src/Interfaces/Contracts/SeverityLevel.ts +15 -2
  100. package/src/Interfaces/IConfig.ts +2 -9
  101. package/src/Interfaces/ITraceParent.ts +38 -0
  102. package/src/RequestResponseHeaders.ts +38 -2
  103. package/src/StorageHelperFuncs.ts +11 -11
  104. package/src/Telemetry/Common/DataSanitizer.ts +10 -10
  105. package/src/Telemetry/PageViewPerformance.ts +1 -1
  106. package/src/TelemetryItemCreator.ts +56 -44
  107. package/src/Util.ts +3 -3
  108. package/src/W3cTraceParent.ts +219 -0
  109. package/src/applicationinsights-common.ts +8 -3
  110. package/types/Enums.d.ts +2 -9
  111. package/types/Interfaces/Contracts/SeverityLevel.d.ts +6 -1
  112. package/types/Interfaces/IConfig.d.ts +3 -9
  113. package/types/Interfaces/ITraceParent.d.ts +32 -0
  114. package/types/RequestResponseHeaders.d.ts +31 -1
  115. package/types/Telemetry/Common/DataSanitizer.d.ts +3 -3
  116. package/types/TelemetryItemCreator.d.ts +15 -5
  117. package/types/W3cTraceParent.d.ts +59 -0
  118. package/types/applicationinsights-common.d.ts +5 -3
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Common JavaScript Library, 2.8.0-nightly.2204-04
2
+ * Microsoft Application Insights Common JavaScript Library, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -13,13 +13,13 @@
13
13
  * ---------------------------------------------------------------------------
14
14
  */
15
15
 
16
+ import { _eInternalMessageId } from '@microsoft/applicationinsights-core-js';
17
+ import { EnumValue } from '@microsoft/applicationinsights-core-js';
16
18
  import { IChannelControls } from '@microsoft/applicationinsights-core-js';
17
19
  import { IConfiguration } from '@microsoft/applicationinsights-core-js';
18
20
  import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
19
- import { ICookieMgrConfig } from '@microsoft/applicationinsights-core-js';
20
21
  import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
21
22
  import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
22
- import { _InternalMessageId } from '@microsoft/applicationinsights-core-js';
23
23
  import { IPlugin } from '@microsoft/applicationinsights-core-js';
24
24
  import { isBeaconsSupported as isBeaconApiSupported } from '@microsoft/applicationinsights-core-js';
25
25
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
@@ -76,6 +76,31 @@ export declare const CorrelationIdHelper: ICorrelationIdHelper;
76
76
 
77
77
  export declare function createDomEvent(eventName: string): Event;
78
78
 
79
+ /**
80
+ * Create a telemetry item that the 1DS channel understands
81
+ * @param item domain specific properties; part B
82
+ * @param baseType telemetry item type. ie PageViewData
83
+ * @param envelopeName name of the envelope. ie Microsoft.ApplicationInsights.<instrumentation key>.PageView
84
+ * @param customProperties user defined custom properties; part C
85
+ * @param systemProperties system properties that are added to the context; part A
86
+ * @returns ITelemetryItem that is sent to channel
87
+ */
88
+ export declare function createTelemetryItem<T>(item: T, baseType: string, envelopeName: string, logger: IDiagnosticLogger, customProperties?: {
89
+ [key: string]: any;
90
+ }, systemProperties?: {
91
+ [key: string]: any;
92
+ }): ITelemetryItem;
93
+
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;
103
+
79
104
  export declare let CtxTagKeys: ContextTagKeys;
80
105
 
81
106
  export declare class Data<TDomain> implements AIData<TDomain>, ISerializable {
@@ -155,7 +180,7 @@ export declare function dataSanitizeException(logger: IDiagnosticLogger, excepti
155
180
 
156
181
  export declare function dataSanitizeId(logger: IDiagnosticLogger, id: string): string;
157
182
 
158
- export declare function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _InternalMessageId): any;
183
+ export declare function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId): any;
159
184
 
160
185
  export declare function dataSanitizeKey(logger: IDiagnosticLogger, name: any): any;
161
186
 
@@ -227,11 +252,7 @@ export declare const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio
227
252
  */
228
253
  export declare const DisabledPropertyName: string;
229
254
 
230
- export declare const DistributedTracingModes: {
231
- AI: number;
232
- AI_AND_W3C: number;
233
- W3C: number;
234
- };
255
+ export declare const DistributedTracingModes: EnumValue<typeof eDistributedTracingModes>;
235
256
 
236
257
  export declare type DistributedTracingModes = number | eDistributedTracingModes;
237
258
 
@@ -295,6 +316,29 @@ export declare class Envelope implements IEnvelope {
295
316
  constructor(logger: IDiagnosticLogger, data: AIBase, name: string);
296
317
  }
297
318
 
319
+ export declare const enum eRequestHeaders {
320
+ requestContextHeader = 0,
321
+ requestContextTargetKey = 1,
322
+ requestContextAppIdFormat = 2,
323
+ requestIdHeader = 3,
324
+ traceParentHeader = 4,
325
+ traceStateHeader = 5,
326
+ sdkContextHeader = 6,
327
+ sdkContextHeaderAppIdRequest = 7,
328
+ requestContextHeaderLowerCase = 8
329
+ }
330
+
331
+ /**
332
+ * Defines the level of severity for the event.
333
+ */
334
+ export declare const enum eSeverityLevel {
335
+ Verbose = 0,
336
+ Information = 1,
337
+ Warning = 2,
338
+ Error = 3,
339
+ Critical = 4
340
+ }
341
+
298
342
  declare class Event_2 implements IEventData, ISerializable {
299
343
  static envelopeType: string;
300
344
  static dataType: string;
@@ -402,12 +446,28 @@ export declare const enum FieldType {
402
446
  Hidden = 4
403
447
  }
404
448
 
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;
454
+
405
455
  /**
406
456
  * Formats the provided errorObj for display and reporting, it may be a String, Object, integer or undefined depending on the browser.
407
457
  * @param errorObj The supplied errorObj
408
458
  */
409
459
  declare function _formatErrorCode(errorObj: any): any;
410
460
 
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;
470
+
411
471
  export declare function getExtensionByName(extensions: IPlugin[], identifier: string): IPlugin | null;
412
472
 
413
473
  export declare const HttpMethod = "http.method";
@@ -658,7 +718,7 @@ export declare interface IConfig {
658
718
  */
659
719
  enableSessionStorageBuffer?: boolean;
660
720
  /**
661
- * @deprecated Use either disableCookiesUsage or specify a cookieMgrCfg with the enabled value set.
721
+ * @deprecated Use either disableCookiesUsage or specify a cookieCfg with the enabled value set.
662
722
  * If true, the SDK will not store or read any data from cookies. Default is false. As this field is being deprecated, when both
663
723
  * isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent.
664
724
  * @defaultValue false
@@ -666,7 +726,7 @@ export declare interface IConfig {
666
726
  isCookieUseDisabled?: boolean;
667
727
  /**
668
728
  * If true, the SDK will not store or read any data from cookies. Default is false.
669
- * If you have also specified a cookieMgrCfg then enabled property (if specified) will take precedent over this value.
729
+ * If you have also specified a cookieCfg then enabled property (if specified) will take precedent over this value.
670
730
  * @defaultValue false
671
731
  */
672
732
  disableCookiesUsage?: boolean;
@@ -680,12 +740,6 @@ export declare interface IConfig {
680
740
  * @defaultValue ""
681
741
  */
682
742
  cookiePath?: string;
683
- /**
684
- * [Optional] A Cookie Manager configuration which includes hooks to allow interception of the get, set and delete cookie
685
- * operations. If this configuration is specified any specified enabled and domain properties will take precedence over the
686
- * cookieDomain and disableCookiesUsage values.
687
- */
688
- cookieMgrCfg?: ICookieMgrConfig;
689
743
  /**
690
744
  * Default false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)
691
745
  * @description
@@ -1144,7 +1198,7 @@ export declare interface IDataSanitizer {
1144
1198
  sanitizeProperties: (logger: IDiagnosticLogger, properties: any) => any;
1145
1199
  sanitizeMeasurements: (logger: IDiagnosticLogger, measurements: any) => any;
1146
1200
  sanitizeId: (logger: IDiagnosticLogger, id: string) => string;
1147
- sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _InternalMessageId) => any;
1201
+ sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) => any;
1148
1202
  padNumber: (num: number) => string;
1149
1203
  /**
1150
1204
  * helper method to trim strings (IE8 does not implement String.prototype.trim)
@@ -1844,6 +1898,13 @@ export declare interface ISession {
1844
1898
 
1845
1899
  export declare function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean;
1846
1900
 
1901
+ /**
1902
+ * Is the parsed traceParent indicating that the trace is currently sampled.
1903
+ * @param value - The parsed traceParent value
1904
+ * @returns
1905
+ */
1906
+ export declare function isSampledFlag(value: ITraceParent): boolean;
1907
+
1847
1908
  declare interface IStackDetails {
1848
1909
  src: string;
1849
1910
  obj: string[];
@@ -1875,6 +1936,31 @@ declare interface IStackFrame {
1875
1936
  line: number;
1876
1937
  }
1877
1938
 
1939
+ /**
1940
+ * Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
1941
+ * string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
1942
+ * If all characters are zero (0000000000000000) this is considered an invalid value.
1943
+ * @param value - The W3c span id to be validated
1944
+ * @returns true if valid otherwise false
1945
+ */
1946
+ export declare function isValidSpanId(value: string): boolean;
1947
+
1948
+ /**
1949
+ * Is the provided W3c Trace Id a valid string representation, it must be a 32-character string
1950
+ * of lowercase hexadecimal characters for example, 4bf92f3577b34da6a3ce929d0e0e4736.
1951
+ * If all characters as zero (00000000000000000000000000000000) it will be considered an invalid value.
1952
+ * @param value - The W3c trace Id to be validated
1953
+ * @returns true if valid otherwise false
1954
+ */
1955
+ export declare function isValidTraceId(value: string): boolean;
1956
+
1957
+ /**
1958
+ * Validates that the provided ITraceParent instance conforms to the currently supported specifications
1959
+ * @param value
1960
+ * @returns
1961
+ */
1962
+ export declare function isValidTraceParent(value: ITraceParent): boolean;
1963
+
1878
1964
  export declare interface ITelemetryContext {
1879
1965
  /**
1880
1966
  * The object describing a component tracked by this object.
@@ -1941,6 +2027,39 @@ export declare interface ITelemetryTrace {
1941
2027
  name?: string;
1942
2028
  }
1943
2029
 
2030
+ /**
2031
+ * This interface represents the components of a W3C traceparent header
2032
+ */
2033
+ export declare interface ITraceParent {
2034
+ /**
2035
+ * The version of the definition, this MUST be a string with a length of 2 and only contain lowercase
2036
+ * hexadecimal characters. A value of 'ff' is considered to be an invalid version.
2037
+ */
2038
+ version: string;
2039
+ /**
2040
+ * This is the ID of the whole trace forest and is used to uniquely identify a distributed trace
2041
+ * through a system. It is represented as a 32-character string of lowercase hexadecimal characters,
2042
+ * for example, 4bf92f3577b34da6a3ce929d0e0e4736.
2043
+ * All characters as zero (00000000000000000000000000000000) is considered an invalid value.
2044
+ */
2045
+ traceId: string;
2046
+ /**
2047
+ * This is the ID of the current request as known by the caller (in some tracing systems, this is also
2048
+ * known as the parent-id, where a span is the execution of a client request). It is represented as an
2049
+ * 16-character string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
2050
+ * All bytes as zero (0000000000000000) is considered an invalid value.
2051
+ */
2052
+ spanId: string;
2053
+ /**
2054
+ * An 8-bit value of flags that controls tracing such as sampling, trace level, etc. These flags are
2055
+ * recommendations given by the caller rather than strict rules to follow.
2056
+ * As this is a bit field, you cannot interpret flags by decoding the hex value and looking at the resulting
2057
+ * number. For example, a flag 00000001 could be encoded as 01 in hex, or 09 in hex if present with the flag
2058
+ * 00001000. A common mistake in bit fields is forgetting to mask when interpreting flags.
2059
+ */
2060
+ traceFlags: number;
2061
+ }
2062
+
1944
2063
  export declare interface ITraceState {
1945
2064
  }
1946
2065
 
@@ -2377,6 +2496,14 @@ export declare class PageViewPerformance implements IPageViewPerfData, ISerializ
2377
2496
 
2378
2497
  export declare function parseConnectionString(connectionString?: string): ConnectionString;
2379
2498
 
2499
+ /**
2500
+ * Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)
2501
+ *
2502
+ * @param value
2503
+ * @returns
2504
+ */
2505
+ export declare function parseTraceParent(value: string): ITraceParent;
2506
+
2380
2507
  export declare const ProcessLegacy = "ProcessLegacy";
2381
2508
 
2382
2509
  export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
@@ -2457,20 +2584,35 @@ export declare class RemoteDependencyData implements IRemoteDependencyData, ISer
2457
2584
  constructor(logger: IDiagnosticLogger, id: string, absoluteUrl: string, commandName: string, value: number, success: boolean, resultCode: number, method?: string, requestAPI?: string, correlationContext?: string, properties?: Object, measurements?: Object);
2458
2585
  }
2459
2586
 
2460
- export declare const RequestHeaders: IRequestHeaders;
2587
+ export declare const RequestHeaders: IRequestHeaders & {
2588
+ requestContextHeader: "Request-Context";
2589
+ requestContextTargetKey: "appId";
2590
+ requestContextAppIdFormat: "appId=cid-v1:";
2591
+ requestIdHeader: "Request-Id";
2592
+ traceParentHeader: "traceparent";
2593
+ traceStateHeader: "tracestate";
2594
+ sdkContextHeader: "Sdk-Context";
2595
+ sdkContextHeaderAppIdRequest: "appId";
2596
+ requestContextHeaderLowerCase: "request-context";
2597
+ 0: "Request-Context";
2598
+ 1: "appId";
2599
+ 2: "appId=cid-v1:";
2600
+ 3: "Request-Id";
2601
+ 4: "traceparent";
2602
+ 5: "tracestate";
2603
+ 6: "Sdk-Context";
2604
+ 7: "appId";
2605
+ 8: "request-context";
2606
+ };
2461
2607
 
2462
2608
  export declare const SampleRate = "sampleRate";
2463
2609
 
2464
2610
  /**
2465
2611
  * Defines the level of severity for the event.
2466
2612
  */
2467
- export declare enum SeverityLevel {
2468
- Verbose = 0,
2469
- Information = 1,
2470
- Warning = 2,
2471
- Error = 3,
2472
- Critical = 4
2473
- }
2613
+ export declare const SeverityLevel: EnumValue<typeof eSeverityLevel>;
2614
+
2615
+ export declare type SeverityLevel = number | eSeverityLevel;
2474
2616
 
2475
2617
  export declare function stringToBoolOrDefault(str: any, defaultValue?: boolean): boolean;
2476
2618
 
@@ -2486,11 +2628,7 @@ export declare class TelemetryItemCreator {
2486
2628
  * @param systemProperties system properties that are added to the context; part A
2487
2629
  * @returns ITelemetryItem that is sent to channel
2488
2630
  */
2489
- static create<T>(item: T, baseType: string, envelopeName: string, logger: IDiagnosticLogger, customProperties?: {
2490
- [key: string]: any;
2491
- }, systemProperties?: {
2492
- [key: string]: any;
2493
- }): ITelemetryItem;
2631
+ static create: typeof createTelemetryItem;
2494
2632
  }
2495
2633
 
2496
2634
  export declare class Trace implements IMessageData, ISerializable {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/dist-esm/Enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,19 +1,18 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- // THIS FILE WAS AUTOGENERATED
7
+ import { createEnumStyle } from "@microsoft/applicationinsights-core-js";
8
8
  /**
9
9
  * Defines the level of severity for the event.
10
10
  */
11
- export var SeverityLevel;
12
- (function (SeverityLevel) {
13
- SeverityLevel[SeverityLevel["Verbose"] = 0] = "Verbose";
14
- SeverityLevel[SeverityLevel["Information"] = 1] = "Information";
15
- SeverityLevel[SeverityLevel["Warning"] = 2] = "Warning";
16
- SeverityLevel[SeverityLevel["Error"] = 3] = "Error";
17
- SeverityLevel[SeverityLevel["Critical"] = 4] = "Critical";
18
- })(SeverityLevel || (SeverityLevel = {}));
11
+ export var SeverityLevel = createEnumStyle({
12
+ Verbose: 0 /* Verbose */,
13
+ Information: 1 /* Information */,
14
+ Warning: 2 /* Warning */,
15
+ Error: 3 /* Error */,
16
+ Critical: 4 /* Critical */
17
+ });
19
18
  //# sourceMappingURL=SeverityLevel.js.map