@microsoft/applicationinsights-web-basic 3.0.0-beta.2211-03 → 3.0.0-beta.2212-03

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 (30) hide show
  1. package/browser/aib.2.js +1072 -1222
  2. package/browser/aib.2.js.map +1 -1
  3. package/browser/aib.2.min.js +2 -2
  4. package/browser/aib.2.min.js.map +1 -1
  5. package/browser/aib.3.0.0-beta.2212-03.integrity.json +26 -0
  6. package/browser/{aib.3.0.0-beta.2211-03.js → aib.3.0.0-beta.2212-03.js} +1073 -1223
  7. package/browser/aib.3.0.0-beta.2212-03.js.map +1 -0
  8. package/browser/aib.3.0.0-beta.2212-03.min.js +6 -0
  9. package/browser/aib.3.0.0-beta.2212-03.min.js.map +1 -0
  10. package/dist/applicationinsights-web-basic.api.json +113 -81
  11. package/dist/applicationinsights-web-basic.api.md +7 -8
  12. package/dist/applicationinsights-web-basic.d.ts +14 -8
  13. package/dist/applicationinsights-web-basic.js +1072 -1222
  14. package/dist/applicationinsights-web-basic.js.map +1 -1
  15. package/dist/applicationinsights-web-basic.min.js +2 -2
  16. package/dist/applicationinsights-web-basic.min.js.map +1 -1
  17. package/dist/applicationinsights-web-basic.rollup.d.ts +14 -8
  18. package/dist-esm/__DynamicConstants.js +3 -2
  19. package/dist-esm/__DynamicConstants.js.map +1 -1
  20. package/dist-esm/index.js +27 -17
  21. package/dist-esm/index.js.map +1 -1
  22. package/package.json +5 -5
  23. package/src/__DynamicConstants.ts +2 -1
  24. package/src/index.ts +43 -26
  25. package/types/__DynamicConstants.d.ts +2 -1
  26. package/types/index.d.ts +8 -2
  27. package/browser/aib.3.0.0-beta.2211-03.integrity.json +0 -26
  28. package/browser/aib.3.0.0-beta.2211-03.js.map +0 -1
  29. package/browser/aib.3.0.0-beta.2211-03.min.js +0 -6
  30. package/browser/aib.3.0.0-beta.2211-03.min.js.map +0 -1
@@ -2664,6 +2664,41 @@
2664
2664
  "isOptional": false,
2665
2665
  "name": "flush"
2666
2666
  },
2667
+ {
2668
+ "kind": "Method",
2669
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!AppInsightsCore#getChannels:member(1)",
2670
+ "docComment": "",
2671
+ "excerptTokens": [
2672
+ {
2673
+ "kind": "Content",
2674
+ "text": "getChannels(): "
2675
+ },
2676
+ {
2677
+ "kind": "Reference",
2678
+ "text": "IChannelControls",
2679
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!IChannelControls:interface"
2680
+ },
2681
+ {
2682
+ "kind": "Content",
2683
+ "text": "[]"
2684
+ },
2685
+ {
2686
+ "kind": "Content",
2687
+ "text": ";"
2688
+ }
2689
+ ],
2690
+ "isStatic": false,
2691
+ "returnTypeTokenRange": {
2692
+ "startIndex": 1,
2693
+ "endIndex": 3
2694
+ },
2695
+ "releaseTag": "Public",
2696
+ "isProtected": false,
2697
+ "overloadIndex": 1,
2698
+ "parameters": [],
2699
+ "isOptional": false,
2700
+ "name": "getChannels"
2701
+ },
2667
2702
  {
2668
2703
  "kind": "Method",
2669
2704
  "canonicalReference": "@microsoft/applicationinsights-web-basic!AppInsightsCore#getCookieMgr:member(1)",
@@ -2923,41 +2958,6 @@
2923
2958
  "isOptional": false,
2924
2959
  "name": "getTraceCtx"
2925
2960
  },
2926
- {
2927
- "kind": "Method",
2928
- "canonicalReference": "@microsoft/applicationinsights-web-basic!AppInsightsCore#getTransmissionControls:member(1)",
2929
- "docComment": "",
2930
- "excerptTokens": [
2931
- {
2932
- "kind": "Content",
2933
- "text": "getTransmissionControls(): "
2934
- },
2935
- {
2936
- "kind": "Reference",
2937
- "text": "IChannelControls",
2938
- "canonicalReference": "@microsoft/applicationinsights-web-basic!IChannelControls:interface"
2939
- },
2940
- {
2941
- "kind": "Content",
2942
- "text": "[][]"
2943
- },
2944
- {
2945
- "kind": "Content",
2946
- "text": ";"
2947
- }
2948
- ],
2949
- "isStatic": false,
2950
- "returnTypeTokenRange": {
2951
- "startIndex": 1,
2952
- "endIndex": 3
2953
- },
2954
- "releaseTag": "Public",
2955
- "isProtected": false,
2956
- "overloadIndex": 1,
2957
- "parameters": [],
2958
- "isOptional": false,
2959
- "name": "getTransmissionControls"
2960
- },
2961
2961
  {
2962
2962
  "kind": "Property",
2963
2963
  "canonicalReference": "@microsoft/applicationinsights-web-basic!AppInsightsCore#getWParam:member",
@@ -4261,12 +4261,12 @@
4261
4261
  },
4262
4262
  {
4263
4263
  "kind": "Method",
4264
- "canonicalReference": "@microsoft/applicationinsights-web-basic!ApplicationInsights#getSKUDefaults:member(1)",
4265
- "docComment": "",
4264
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!ApplicationInsights#initialize:member(1)",
4265
+ "docComment": "/**\n * Initialize this instance of ApplicationInsights\n *\n * @memberof ApplicationInsights\n */\n",
4266
4266
  "excerptTokens": [
4267
4267
  {
4268
4268
  "kind": "Content",
4269
- "text": "getSKUDefaults(): "
4269
+ "text": "initialize(): "
4270
4270
  },
4271
4271
  {
4272
4272
  "kind": "Content",
@@ -4287,20 +4287,43 @@
4287
4287
  "overloadIndex": 1,
4288
4288
  "parameters": [],
4289
4289
  "isOptional": false,
4290
- "name": "getSKUDefaults"
4290
+ "name": "initialize"
4291
4291
  },
4292
4292
  {
4293
4293
  "kind": "Method",
4294
- "canonicalReference": "@microsoft/applicationinsights-web-basic!ApplicationInsights#initialize:member(1)",
4295
- "docComment": "/**\n * Initialize this instance of ApplicationInsights\n *\n * @memberof ApplicationInsights\n */\n",
4294
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!ApplicationInsights#onCfgChange:member(1)",
4295
+ "docComment": "/**\n * Watches and tracks changes for accesses to the current config, and if the accessed config changes the handler will be recalled.\n *\n * @param handler - \n *\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\n */\n",
4296
4296
  "excerptTokens": [
4297
4297
  {
4298
4298
  "kind": "Content",
4299
- "text": "initialize(): "
4299
+ "text": "onCfgChange(handler: "
4300
+ },
4301
+ {
4302
+ "kind": "Reference",
4303
+ "text": "WatcherFunction",
4304
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!WatcherFunction:type"
4300
4305
  },
4301
4306
  {
4302
4307
  "kind": "Content",
4303
- "text": "void"
4308
+ "text": "<"
4309
+ },
4310
+ {
4311
+ "kind": "Reference",
4312
+ "text": "IConfiguration",
4313
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!IConfiguration:interface"
4314
+ },
4315
+ {
4316
+ "kind": "Content",
4317
+ "text": ">"
4318
+ },
4319
+ {
4320
+ "kind": "Content",
4321
+ "text": "): "
4322
+ },
4323
+ {
4324
+ "kind": "Reference",
4325
+ "text": "IUnloadHook",
4326
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!IUnloadHook:interface"
4304
4327
  },
4305
4328
  {
4306
4329
  "kind": "Content",
@@ -4309,15 +4332,24 @@
4309
4332
  ],
4310
4333
  "isStatic": false,
4311
4334
  "returnTypeTokenRange": {
4312
- "startIndex": 1,
4313
- "endIndex": 2
4335
+ "startIndex": 6,
4336
+ "endIndex": 7
4314
4337
  },
4315
4338
  "releaseTag": "Public",
4316
4339
  "isProtected": false,
4317
4340
  "overloadIndex": 1,
4318
- "parameters": [],
4341
+ "parameters": [
4342
+ {
4343
+ "parameterName": "handler",
4344
+ "parameterTypeTokenRange": {
4345
+ "startIndex": 1,
4346
+ "endIndex": 5
4347
+ },
4348
+ "isOptional": false
4349
+ }
4350
+ ],
4319
4351
  "isOptional": false,
4320
- "name": "initialize"
4352
+ "name": "onCfgChange"
4321
4353
  },
4322
4354
  {
4323
4355
  "kind": "Method",
@@ -5165,6 +5197,39 @@
5165
5197
  ],
5166
5198
  "name": "flush"
5167
5199
  },
5200
+ {
5201
+ "kind": "MethodSignature",
5202
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!IAppInsightsCore#getChannels:member(1)",
5203
+ "docComment": "",
5204
+ "excerptTokens": [
5205
+ {
5206
+ "kind": "Content",
5207
+ "text": "getChannels(): "
5208
+ },
5209
+ {
5210
+ "kind": "Reference",
5211
+ "text": "IChannelControls",
5212
+ "canonicalReference": "@microsoft/applicationinsights-web-basic!IChannelControls:interface"
5213
+ },
5214
+ {
5215
+ "kind": "Content",
5216
+ "text": "[]"
5217
+ },
5218
+ {
5219
+ "kind": "Content",
5220
+ "text": ";"
5221
+ }
5222
+ ],
5223
+ "isOptional": false,
5224
+ "returnTypeTokenRange": {
5225
+ "startIndex": 1,
5226
+ "endIndex": 3
5227
+ },
5228
+ "releaseTag": "Public",
5229
+ "overloadIndex": 1,
5230
+ "parameters": [],
5231
+ "name": "getChannels"
5232
+ },
5168
5233
  {
5169
5234
  "kind": "MethodSignature",
5170
5235
  "canonicalReference": "@microsoft/applicationinsights-web-basic!IAppInsightsCore#getCookieMgr:member(1)",
@@ -5383,39 +5448,6 @@
5383
5448
  ],
5384
5449
  "name": "getTraceCtx"
5385
5450
  },
5386
- {
5387
- "kind": "MethodSignature",
5388
- "canonicalReference": "@microsoft/applicationinsights-web-basic!IAppInsightsCore#getTransmissionControls:member(1)",
5389
- "docComment": "",
5390
- "excerptTokens": [
5391
- {
5392
- "kind": "Content",
5393
- "text": "getTransmissionControls(): "
5394
- },
5395
- {
5396
- "kind": "Reference",
5397
- "text": "IChannelControls",
5398
- "canonicalReference": "@microsoft/applicationinsights-web-basic!IChannelControls:interface"
5399
- },
5400
- {
5401
- "kind": "Content",
5402
- "text": "[][]"
5403
- },
5404
- {
5405
- "kind": "Content",
5406
- "text": ";"
5407
- }
5408
- ],
5409
- "isOptional": false,
5410
- "returnTypeTokenRange": {
5411
- "startIndex": 1,
5412
- "endIndex": 3
5413
- },
5414
- "releaseTag": "Public",
5415
- "overloadIndex": 1,
5416
- "parameters": [],
5417
- "name": "getTransmissionControls"
5418
- },
5419
5451
  {
5420
5452
  "kind": "PropertySignature",
5421
5453
  "canonicalReference": "@microsoft/applicationinsights-web-basic!IAppInsightsCore#getWParam:member",
@@ -10654,7 +10686,7 @@
10654
10686
  "excerptTokens": [
10655
10687
  {
10656
10688
  "kind": "Content",
10657
- "text": "export declare type SeverityLevel = "
10689
+ "text": "export type SeverityLevel = "
10658
10690
  },
10659
10691
  {
10660
10692
  "kind": "Content",
@@ -32,6 +32,10 @@ export class AppInsightsCore implements IAppInsightsCore {
32
32
  eventCnt(): number;
33
33
  evtNamespace(): string;
34
34
  flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): void;
35
+ // Warning: (ae-forgotten-export) The symbol "IChannelControls" needs to be exported by the entry point index.d.ts
36
+ //
37
+ // (undocumented)
38
+ getChannels(): IChannelControls[];
35
39
  // Warning: (ae-forgotten-export) The symbol "ICookieMgr" needs to be exported by the entry point index.d.ts
36
40
  getCookieMgr(): ICookieMgr;
37
41
  // (undocumented)
@@ -48,10 +52,6 @@ export class AppInsightsCore implements IAppInsightsCore {
48
52
  getProcessTelContext(): IProcessTelemetryContext;
49
53
  // Warning: (ae-forgotten-export) The symbol "IDistributedTraceContext" needs to be exported by the entry point index.d.ts
50
54
  getTraceCtx(createNew?: boolean): IDistributedTraceContext | null;
51
- // Warning: (ae-forgotten-export) The symbol "IChannelControls" needs to be exported by the entry point index.d.ts
52
- //
53
- // (undocumented)
54
- getTransmissionControls(): IChannelControls[][];
55
55
  getWParam: () => number;
56
56
  // Warning: (ae-forgotten-export) The symbol "INotificationManager" needs to be exported by the entry point index.d.ts
57
57
  //
@@ -97,9 +97,8 @@ export class ApplicationInsights {
97
97
  evtNamespace(): string;
98
98
  flush(async?: boolean): void;
99
99
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
100
- // (undocumented)
101
- getSKUDefaults(): void;
102
100
  initialize(): void;
101
+ onCfgChange(handler: WatcherFunction<IConfiguration>): IUnloadHook;
103
102
  // (undocumented)
104
103
  pollInternalLogs(): void;
105
104
  // (undocumented)
@@ -311,13 +310,13 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
311
310
  config: IConfiguration;
312
311
  evtNamespace(): string;
313
312
  flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
313
+ // (undocumented)
314
+ getChannels(): IChannelControls[];
314
315
  getCookieMgr(): ICookieMgr;
315
316
  getNotifyMgr(): INotificationManager;
316
317
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
317
318
  getProcessTelContext(): IProcessTelemetryContext;
318
319
  getTraceCtx(createNew?: boolean): IDistributedTraceContext | null;
319
- // (undocumented)
320
- getTransmissionControls(): IChannelControls[][];
321
320
  getWParam: () => number;
322
321
  // (undocumented)
323
322
  initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 3.0.0-beta.2211-03
2
+ * Microsoft.ApplicationInsights, 3.0.0-beta.2212-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -35,7 +35,7 @@ declare namespace ApplicationInsights {
35
35
  getWParam: () => number;
36
36
  constructor();
37
37
  initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
38
- getTransmissionControls(): IChannelControls[][];
38
+ getChannels(): IChannelControls[];
39
39
  track(telemetryItem: ITelemetryItem): void;
40
40
  getProcessTelContext(): IProcessTelemetryContext;
41
41
  getNotifyMgr(): INotificationManager;
@@ -186,7 +186,6 @@ declare namespace ApplicationInsights {
186
186
  flush(async?: boolean): void;
187
187
  pollInternalLogs(): void;
188
188
  stopPollingInternalLogs(): void;
189
- getSKUDefaults(): void;
190
189
  /**
191
190
  * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
192
191
  * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
@@ -217,6 +216,13 @@ declare namespace ApplicationInsights {
217
216
  * @param handler - the handler
218
217
  */
219
218
  addUnloadCb(handler: UnloadHandler): void;
219
+ /**
220
+ * Watches and tracks changes for accesses to the current config, and if the accessed config changes the
221
+ * handler will be recalled.
222
+ * @param handler
223
+ * @returns A watcher handler instance that can be used to remove itself when being unloaded
224
+ */
225
+ onCfgChange(handler: WatcherFunction<IConfiguration>): IUnloadHook;
220
226
  }
221
227
 
222
228
  export { arrForEach }
@@ -465,7 +471,7 @@ declare namespace ApplicationInsights {
465
471
  */
466
472
  isInitialized?: () => boolean;
467
473
  initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
468
- getTransmissionControls(): IChannelControls[][];
474
+ getChannels(): IChannelControls[];
469
475
  track(telemetryItem: ITelemetryItem): void;
470
476
  /**
471
477
  * Get the current notification manager
@@ -732,11 +738,11 @@ declare namespace ApplicationInsights {
732
738
  /**
733
739
  * Pause sending data
734
740
  */
735
- pause(): void;
741
+ pause?(): void;
736
742
  /**
737
743
  * Resume sending data
738
744
  */
739
- resume(): void;
745
+ resume?(): void;
740
746
  /**
741
747
  * Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
742
748
  * therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
@@ -745,7 +751,7 @@ declare namespace ApplicationInsights {
745
751
  * @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.
746
752
  * @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
747
753
  */
748
- teardown: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
754
+ teardown?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
749
755
  /**
750
756
  * Flush to send data immediately; channel should default to sending data asynchronously
751
757
  * @param async - send data asynchronously when true
@@ -754,7 +760,7 @@ declare namespace ApplicationInsights {
754
760
  * @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
755
761
  * @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
756
762
  */
757
- flush(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void;
763
+ flush?(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void;
758
764
  }
759
765
 
760
766
  interface IChannelControlsAI extends IChannelControls {