@microsoft/applicationinsights-web-basic 3.0.0-beta.2303-03 → 3.0.0-beta.2303-05

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 3.0.0-beta.2303-03
2
+ * Microsoft.ApplicationInsights, 3.0.0-beta.2303-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -13,9 +13,8 @@ declare namespace ApplicationInsights {
13
13
  import { ITimerHandler } from '@nevware21/ts-utils';
14
14
  import { throwError } from '@nevware21/ts-utils';
15
15
 
16
- class AppInsightsCore implements IAppInsightsCore {
17
- static defaultConfig: IConfiguration;
18
- config: IConfiguration;
16
+ class AppInsightsCore<CfgType extends IConfiguration = IConfiguration> implements IAppInsightsCore<CfgType> {
17
+ config: CfgType;
19
18
  logger: IDiagnosticLogger;
20
19
  /**
21
20
  * An array of the installed plugins that provide a version
@@ -34,7 +33,7 @@ declare namespace ApplicationInsights {
34
33
  */
35
34
  getWParam: () => number;
36
35
  constructor();
37
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
36
+ initialize(config: CfgType, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
38
37
  getChannels(): IChannelControls[];
39
38
  track(telemetryItem: ITelemetryItem): void;
40
39
  getProcessTelContext(): IProcessTelemetryContext;
@@ -103,7 +102,7 @@ declare namespace ApplicationInsights {
103
102
  * @param newConfig - The new configuration is apply
104
103
  * @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to true.
105
104
  */
106
- updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
105
+ updateCfg(newConfig: CfgType, mergeExisting?: boolean): void;
107
106
  /**
108
107
  * Returns the unique event namespace that should be used
109
108
  */
@@ -142,7 +141,7 @@ declare namespace ApplicationInsights {
142
141
  * @param handler
143
142
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
144
143
  */
145
- onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
144
+ onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
146
145
  protected releaseQueue(): void;
147
146
  /**
148
147
  * Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
@@ -480,9 +479,12 @@ declare namespace ApplicationInsights {
480
479
  Critical = 4
481
480
  }
482
481
 
483
- interface IAppInsightsCore extends IPerfManagerProvider {
484
- config: IConfiguration;
485
- logger: IDiagnosticLogger;
482
+ interface IAppInsightsCore<CfgType extends IConfiguration = IConfiguration> extends IPerfManagerProvider {
483
+ readonly config: CfgType;
484
+ /**
485
+ * The current logger instance for this instance.
486
+ */
487
+ readonly logger: IDiagnosticLogger;
486
488
  /**
487
489
  * An array of the installed plugins that provide a version
488
490
  */
@@ -495,7 +497,7 @@ declare namespace ApplicationInsights {
495
497
  * Returns a value that indicates whether the instance has already been previously initialized.
496
498
  */
497
499
  isInitialized?: () => boolean;
498
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
500
+ initialize(config: CfgType, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
499
501
  getChannels(): IChannelControls[];
500
502
  track(telemetryItem: ITelemetryItem): void;
501
503
  /**
@@ -567,7 +569,7 @@ declare namespace ApplicationInsights {
567
569
  * @param newConfig - The new configuration is apply
568
570
  * @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to merge.
569
571
  */
570
- updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
572
+ updateCfg(newConfig: CfgType, mergeExisting?: boolean): void;
571
573
  /**
572
574
  * Returns the unique event namespace that should be used when registering events
573
575
  */
@@ -607,7 +609,7 @@ declare namespace ApplicationInsights {
607
609
  * @param handler
608
610
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
609
611
  */
610
- onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
612
+ onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
611
613
  /**
612
614
  * Function used to identify the get w parameter used to identify status bit to some channels
613
615
  */
@@ -860,7 +862,7 @@ declare namespace ApplicationInsights {
860
862
  disableAjaxTracking?: boolean;
861
863
  /**
862
864
  * If true, Fetch requests are not autocollected. Default is false (Since 2.8.0, previously true).
863
- * @defaultValue true
865
+ * @defaultValue false
864
866
  */
865
867
  disableFetchTracking?: boolean;
866
868
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2303-03
2
+ * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2303-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1614,7 +1614,7 @@
1614
1614
  }
1615
1615
 
1616
1616
  var _objDefineProperty = ObjDefineProperty;
1617
- var version = "3.0.0-beta.2303-03";
1617
+ var version = "3.0.0-beta.2303-05";
1618
1618
  var instanceName = "." + newId(6);
1619
1619
  var _dataUid = 0;
1620
1620
  function _createAccessor(target, prop, value) {
@@ -4618,10 +4618,10 @@
4618
4618
  var _DYN_PROBLEM_GROUP = "problemGroup";
4619
4619
  var _DYN_IS_MANUAL = "isManual";
4620
4620
  var _DYN__CREATE_FROM_INTERFA1 = "CreateFromInterface";
4621
+ var _DYN_ASSEMBLY = "assembly";
4621
4622
  var _DYN_HAS_FULL_STACK = "hasFullStack";
4622
4623
  var _DYN_LEVEL = "level";
4623
4624
  var _DYN_METHOD = "method";
4624
- var _DYN_ASSEMBLY = "assembly";
4625
4625
  var _DYN_FILE_NAME = "fileName";
4626
4626
  var _DYN_LINE = "line";
4627
4627
  var _DYN_DURATION = "duration";
@@ -5335,6 +5335,9 @@
5335
5335
  _self[_DYN_MESSAGE ] = dataSanitizeMessage(logger, _formatMessage(exception || error, _self[_DYN_TYPE_NAME ])) || strNotSpecified;
5336
5336
  var stack = exception[strStackDetails] || _getStackFromErrorObj(exception);
5337
5337
  _self[_DYN_PARSED_STACK ] = _parseStack(stack);
5338
+ if (isArray(_self[_DYN_PARSED_STACK ])) {
5339
+ arrMap(_self[_DYN_PARSED_STACK ], function (frame) { return frame[_DYN_ASSEMBLY ] = dataSanitizeString(logger, frame[_DYN_ASSEMBLY ]); });
5340
+ }
5338
5341
  _self[strStack] = dataSanitizeException(logger, _formatStackTrace(stack));
5339
5342
  _self.hasFullStack = isArray(_self.parsedStack) && _self.parsedStack[_DYN_LENGTH$1 ] > 0;
5340
5343
  if (properties) {
@@ -5893,7 +5896,7 @@
5893
5896
  }
5894
5897
  }
5895
5898
  var EnvelopeCreator = {
5896
- Version: "3.0.0-beta.2303-03"
5899
+ Version: "3.0.0-beta.2303-05"
5897
5900
  };
5898
5901
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
5899
5902
  EnvelopeCreatorInit(logger, telemetryItem);