@microsoft/applicationinsights-core-js 3.0.0-beta.2303-02 → 3.0.0-beta.2303-04

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 (132) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +2 -2
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +113 -206
  7. package/dist/applicationinsights-core-js.api.md +11 -14
  8. package/dist/applicationinsights-core-js.d.ts +15 -13
  9. package/dist/applicationinsights-core-js.js +2 -2
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +15 -13
  14. package/dist-esm/Config/ConfigDefaultHelpers.js +1 -1
  15. package/dist-esm/Config/ConfigDefaults.js +1 -1
  16. package/dist-esm/Config/DynamicConfig.js +1 -1
  17. package/dist-esm/Config/DynamicProperty.js +1 -1
  18. package/dist-esm/Config/DynamicState.js +1 -1
  19. package/dist-esm/Config/DynamicSupport.js +1 -1
  20. package/dist-esm/Config/IConfigDefaults.js +1 -1
  21. package/dist-esm/Config/IDynamicConfigHandler.js +1 -1
  22. package/dist-esm/Config/IDynamicPropertyHandler.js +1 -1
  23. package/dist-esm/Config/IDynamicWatcher.js +1 -1
  24. package/dist-esm/Config/_IDynamicConfigHandlerState.js +1 -1
  25. package/dist-esm/JavaScriptSDK/AggregationError.js +1 -1
  26. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  27. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  28. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  29. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  30. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  31. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
  32. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  33. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  34. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  35. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  36. package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
  37. package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
  38. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  39. package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
  40. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  41. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  42. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  43. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  44. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  45. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  46. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  47. package/dist-esm/JavaScriptSDK/UnloadHookContainer.js +1 -1
  48. package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  55. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  56. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  57. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  58. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  67. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  68. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  69. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  70. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  71. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  72. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  73. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  74. package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  75. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
  76. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  77. package/dist-esm/__DynamicConstants.js +1 -1
  78. package/dist-esm/applicationinsights-core-js.js +1 -1
  79. package/package.json +1 -1
  80. package/types/JavaScriptSDK/AppInsightsCore.d.ts +5 -6
  81. package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +9 -6
  82. package/src/JavaScriptSDK/AggregationError.ts +0 -36
  83. package/src/JavaScriptSDK/AppInsightsCore.ts +0 -1322
  84. package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +0 -343
  85. package/src/JavaScriptSDK/Constants.ts +0 -4
  86. package/src/JavaScriptSDK/CookieMgr.ts +0 -449
  87. package/src/JavaScriptSDK/CoreUtils.ts +0 -58
  88. package/src/JavaScriptSDK/DataCacheHelper.ts +0 -107
  89. package/src/JavaScriptSDK/DbgExtensionUtils.ts +0 -56
  90. package/src/JavaScriptSDK/DiagnosticLogger.ts +0 -380
  91. package/src/JavaScriptSDK/EnvUtils.ts +0 -312
  92. package/src/JavaScriptSDK/EventHelpers.ts +0 -550
  93. package/src/JavaScriptSDK/HelperFuncs.ts +0 -351
  94. package/src/JavaScriptSDK/InstrumentHooks.ts +0 -280
  95. package/src/JavaScriptSDK/InternalConstants.ts +0 -31
  96. package/src/JavaScriptSDK/NotificationManager.ts +0 -165
  97. package/src/JavaScriptSDK/PerfManager.ts +0 -288
  98. package/src/JavaScriptSDK/ProcessTelemetryContext.ts +0 -674
  99. package/src/JavaScriptSDK/RandomHelper.ts +0 -145
  100. package/src/JavaScriptSDK/TelemetryHelpers.ts +0 -184
  101. package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +0 -112
  102. package/src/JavaScriptSDK/UnloadHandlerContainer.ts +0 -45
  103. package/src/JavaScriptSDK/UnloadHookContainer.ts +0 -52
  104. package/src/JavaScriptSDK/W3cTraceParent.ts +0 -197
  105. package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +0 -24
  106. package/src/JavaScriptSDK.Enums/EventsDiscardedReason.ts +0 -71
  107. package/src/JavaScriptSDK.Enums/LoggingEnums.ts +0 -121
  108. package/src/JavaScriptSDK.Enums/SendRequestReason.ts +0 -56
  109. package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +0 -27
  110. package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +0 -27
  111. package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +0 -216
  112. package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +0 -46
  113. package/src/JavaScriptSDK.Interfaces/IConfiguration.ts +0 -176
  114. package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +0 -116
  115. package/src/JavaScriptSDK.Interfaces/IDbgExtension.ts +0 -14
  116. package/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts +0 -75
  117. package/src/JavaScriptSDK.Interfaces/IDistributedTraceContext.ts +0 -54
  118. package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +0 -100
  119. package/src/JavaScriptSDK.Interfaces/INotificationListener.ts +0 -39
  120. package/src/JavaScriptSDK.Interfaces/INotificationManager.ts +0 -52
  121. package/src/JavaScriptSDK.Interfaces/IPerfEvent.ts +0 -69
  122. package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +0 -53
  123. package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +0 -157
  124. package/src/JavaScriptSDK.Interfaces/ITelemetryInitializers.ts +0 -17
  125. package/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts +0 -62
  126. package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +0 -94
  127. package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +0 -30
  128. package/src/JavaScriptSDK.Interfaces/ITelemetryUnloadState.ts +0 -10
  129. package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +0 -44
  130. package/src/JavaScriptSDK.Interfaces/ITraceParent.ts +0 -38
  131. package/src/JavaScriptSDK.Interfaces/IUnloadHook.ts +0 -22
  132. package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +0 -17
@@ -1,94 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
- "use strict";
4
-
5
- import { IAppInsightsCore } from "./IAppInsightsCore";
6
- import { IConfiguration } from "./IConfiguration";
7
- import { IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext } from "./IProcessTelemetryContext";
8
- import { ITelemetryItem } from "./ITelemetryItem";
9
- import { ITelemetryPluginChain } from "./ITelemetryPluginChain";
10
- import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
11
- import { ITelemetryUpdateState } from "./ITelemetryUpdateState";
12
-
13
- export interface ITelemetryProcessor {
14
- /**
15
- * Call back for telemetry processing before it it is sent
16
- * @param env - This is the current event being reported
17
- * @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
18
- * can optionally use this to access the current core instance or define / pass additional information
19
- * to later plugins (vs appending items to the telemetry item)
20
- */
21
- processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
22
-
23
- /**
24
- * The the plugin should re-evaluate configuration and update any cached configuration settings or
25
- * plugins. If implemented this method will be called whenever a plugin is added or removed and if
26
- * the configuration has bee updated.
27
- * @param updateCtx - This is the context that should be used during updating.
28
- * @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
29
- * @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
30
- */
31
- update?: (updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState) => void | boolean;
32
- }
33
-
34
- /**
35
- * Configuration provided to SDK core
36
- */
37
- export interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
38
- /**
39
- * Set next extension for telemetry processing, this is not optional as plugins should use the
40
- * processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
41
- * now for backward compatibility only.
42
- */
43
- setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
44
-
45
- /**
46
- * Priority of the extension
47
- */
48
- readonly priority: number;
49
- }
50
-
51
- export interface IPlugin {
52
- /**
53
- * Initialize plugin loaded by SDK
54
- * @param config - The config for the plugin to use
55
- * @param core - The current App Insights core to use for initializing this plugin instance
56
- * @param extensions - The complete set of extensions to be used for initializing the plugin
57
- * @param pluginChain - [Optional] specifies the current plugin chain which identifies the
58
- * set of plugins and the order they should be executed for the current request.
59
- */
60
- initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) => void;
61
-
62
- /**
63
- * Returns a value that indicates whether the plugin has already been previously initialized.
64
- * New plugins should implement this method to avoid being initialized more than once.
65
- */
66
- isInitialized?: () => boolean;
67
-
68
- /**
69
- * Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
70
- * therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
71
- * processTelemetry calls are ignored and it just calls the processNext() with the provided context.
72
- * @param unloadCtx - This is the context that should be used during unloading.
73
- * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
74
- * @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
75
- */
76
- teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
77
-
78
- /**
79
- * Extension name
80
- */
81
- readonly identifier: string;
82
-
83
- /**
84
- * Plugin version (available in data.properties.version in common schema)
85
- */
86
- readonly version?: string;
87
-
88
- /**
89
- * The App Insights core to use for backward compatibility.
90
- * Therefore the interface will be able to access the core without needing to cast to "any".
91
- * [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
92
- */
93
- core?: IAppInsightsCore
94
- }
@@ -1,30 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
5
- import { ITelemetryPlugin, ITelemetryProcessor } from "./ITelemetryPlugin";
6
- import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
7
-
8
- /**
9
- * Configuration provided to SDK core
10
- */
11
- export interface ITelemetryPluginChain extends ITelemetryProcessor {
12
-
13
- /**
14
- * Returns the underlying plugin that is being proxied for the processTelemetry call
15
- */
16
- getPlugin: () => ITelemetryPlugin;
17
-
18
- /**
19
- * Returns the next plugin
20
- */
21
- getNext: () => ITelemetryPluginChain;
22
-
23
- /**
24
- * This plugin is being unloaded and should remove any hooked events and cleanup any global/scoped values, after this
25
- * call the plugin will be removed from the telemetry processing chain and will no longer receive any events..
26
- * @param unloadCtx - The unload context to use for this call.
27
- * @param unloadState - The details of the unload operation
28
- */
29
- unload?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
30
- }
@@ -1,10 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { TelemetryUnloadReason } from "../JavaScriptSDK.Enums/TelemetryUnloadReason";
5
-
6
- export interface ITelemetryUnloadState {
7
- reason: TelemetryUnloadReason;
8
- isAsync: boolean;
9
- flushComplete?: boolean;
10
- }
@@ -1,44 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { TelemetryUpdateReason } from "../JavaScriptSDK.Enums/TelemetryUpdateReason";
5
- import { IConfiguration } from "./IConfiguration";
6
- import { IPlugin } from "./ITelemetryPlugin";
7
-
8
- export interface ITelemetryUpdateState {
9
-
10
- /**
11
- * Identifies the reason for the update notification, this is a bitwise numeric value
12
- */
13
- reason: TelemetryUpdateReason;
14
-
15
- /**
16
- * This is a new active configuration that should be used
17
- */
18
- cfg?: IConfiguration,
19
-
20
- /**
21
- * The detected changes
22
- */
23
- oldCfg?: IConfiguration,
24
-
25
- /**
26
- * If this is a configuration update this was the previous configuration that was used
27
- */
28
- newConfig?: IConfiguration,
29
-
30
- /**
31
- * Was the new config requested to be merged with the existing config
32
- */
33
- merge?: boolean,
34
-
35
- /**
36
- * This holds a collection of plugins that have been added (if the reason identifies that one or more plugins have been added)
37
- */
38
- added?: IPlugin[];
39
-
40
- /**
41
- * This holds a collection of plugins that have been removed (if the reason identifies that one or more plugins have been removed)
42
- */
43
- removed?: IPlugin[]
44
- }
@@ -1,38 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- /**
5
- * This interface represents the components of a W3C traceparent header
6
- */
7
- export interface ITraceParent {
8
- /**
9
- * The version of the definition, this MUST be a string with a length of 2 and only contain lowercase
10
- * hexadecimal characters. A value of 'ff' is considered to be an invalid version.
11
- */
12
- version: string;
13
-
14
- /**
15
- * This is the ID of the whole trace forest and is used to uniquely identify a distributed trace
16
- * through a system. It is represented as a 32-character string of lowercase hexadecimal characters,
17
- * for example, 4bf92f3577b34da6a3ce929d0e0e4736.
18
- * All characters as zero (00000000000000000000000000000000) is considered an invalid value.
19
- */
20
- traceId: string;
21
-
22
- /**
23
- * This is the ID of the current request as known by the caller (in some tracing systems, this is also
24
- * known as the parent-id, where a span is the execution of a client request). It is represented as an
25
- * 16-character string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
26
- * All bytes as zero (0000000000000000) is considered an invalid value.
27
- */
28
- spanId: string;
29
-
30
- /**
31
- * An 8-bit value of flags that controls tracing such as sampling, trace level, etc. These flags are
32
- * recommendations given by the caller rather than strict rules to follow.
33
- * As this is a bit field, you cannot interpret flags by decoding the hex value and looking at the resulting
34
- * number. For example, a flag 00000001 could be encoded as 01 in hex, or 09 in hex if present with the flag
35
- * 00001000. A common mistake in bit fields is forgetting to mask when interpreting flags.
36
- */
37
- traceFlags: number;
38
- }
@@ -1,22 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- /**
5
- * An interface which provides automatic removal during unloading of the component
6
- */
7
- export interface IUnloadHook {
8
- /**
9
- * Self remove the referenced component
10
- */
11
- rm: () => void;
12
- }
13
-
14
- /**
15
- * An alternate interface which provides automatic removal during unloading of the component
16
- */
17
- export interface ILegacyUnloadHook {
18
- /**
19
- * Legacy Self remove the referenced component
20
- */
21
- remove: () => void;
22
- }
@@ -1,17 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License.
3
-
4
- import { IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
5
- import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
6
-
7
- export interface IUnloadableComponent {
8
- /**
9
- * Teardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin
10
- * finishes it's removal.
11
- * @param unloadCtx - This is the context that should be used during unloading.
12
- * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
13
- * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
14
- * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
15
- */
16
- _doUnload?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
17
- }