@microsoft/applicationinsights-web 3.0.0-beta.2208-19 → 3.0.0-beta.2209-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 (55) hide show
  1. package/README.md +2 -1
  2. package/browser/{ai.3.0.0-beta.2208-19.cjs.js → ai.3.0.0-beta.2209-03.cjs.js} +190 -115
  3. package/browser/ai.3.0.0-beta.2209-03.cjs.js.map +1 -0
  4. package/browser/ai.3.0.0-beta.2209-03.cjs.min.js +6 -0
  5. package/browser/ai.3.0.0-beta.2209-03.cjs.min.js.map +1 -0
  6. package/browser/{ai.3.0.0-beta.2208-19.gbl.js → ai.3.0.0-beta.2209-03.gbl.js} +190 -115
  7. package/browser/ai.3.0.0-beta.2209-03.gbl.js.map +1 -0
  8. package/browser/ai.3.0.0-beta.2209-03.gbl.min.js +6 -0
  9. package/browser/ai.3.0.0-beta.2209-03.gbl.min.js.map +1 -0
  10. package/browser/ai.3.0.0-beta.2209-03.integrity.json +66 -0
  11. package/browser/{ai.3.0.0-beta.2208-19.js → ai.3.0.0-beta.2209-03.js} +190 -115
  12. package/browser/ai.3.0.0-beta.2209-03.js.map +1 -0
  13. package/browser/ai.3.0.0-beta.2209-03.min.js +6 -0
  14. package/browser/ai.3.0.0-beta.2209-03.min.js.map +1 -0
  15. package/browser/ai.3.cjs.js +189 -114
  16. package/browser/ai.3.cjs.js.map +1 -1
  17. package/browser/ai.3.cjs.min.js +2 -2
  18. package/browser/ai.3.cjs.min.js.map +1 -1
  19. package/browser/ai.3.gbl.js +189 -114
  20. package/browser/ai.3.gbl.js.map +1 -1
  21. package/browser/ai.3.gbl.min.js +2 -2
  22. package/browser/ai.3.gbl.min.js.map +1 -1
  23. package/browser/ai.3.js +189 -114
  24. package/browser/ai.3.js.map +1 -1
  25. package/browser/ai.3.min.js +2 -2
  26. package/browser/ai.3.min.js.map +1 -1
  27. package/dist/applicationinsights-web.api.json +176 -32
  28. package/dist/applicationinsights-web.api.md +12 -6
  29. package/dist/applicationinsights-web.d.ts +108 -8
  30. package/dist/applicationinsights-web.js +189 -114
  31. package/dist/applicationinsights-web.js.map +1 -1
  32. package/dist/applicationinsights-web.min.js +2 -2
  33. package/dist/applicationinsights-web.min.js.map +1 -1
  34. package/dist/applicationinsights-web.rollup.d.ts +108 -8
  35. package/dist-esm/ApplicationInsightsContainer.js +1 -1
  36. package/dist-esm/Init.js +1 -1
  37. package/dist-esm/Initialization.js +14 -7
  38. package/dist-esm/Initialization.js.map +1 -1
  39. package/dist-esm/InternalConstants.js +1 -1
  40. package/dist-esm/__DynamicConstants.js +1 -1
  41. package/dist-esm/applicationinsights-web.js +1 -1
  42. package/package.json +7 -7
  43. package/src/Initialization.ts +17 -2
  44. package/types/Initialization.d.ts +10 -1
  45. package/types/tsdoc-metadata.json +1 -1
  46. package/browser/ai.3.0.0-beta.2208-19.cjs.js.map +0 -1
  47. package/browser/ai.3.0.0-beta.2208-19.cjs.min.js +0 -6
  48. package/browser/ai.3.0.0-beta.2208-19.cjs.min.js.map +0 -1
  49. package/browser/ai.3.0.0-beta.2208-19.gbl.js.map +0 -1
  50. package/browser/ai.3.0.0-beta.2208-19.gbl.min.js +0 -6
  51. package/browser/ai.3.0.0-beta.2208-19.gbl.min.js.map +0 -1
  52. package/browser/ai.3.0.0-beta.2208-19.integrity.json +0 -66
  53. package/browser/ai.3.0.0-beta.2208-19.js.map +0 -1
  54. package/browser/ai.3.0.0-beta.2208-19.min.js +0 -6
  55. package/browser/ai.3.0.0-beta.2208-19.min.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.29.2",
4
+ "toolVersion": "7.31.1",
5
5
  "schemaVersion": 1009,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -2482,7 +2482,7 @@
2482
2482
  {
2483
2483
  "kind": "Reference",
2484
2484
  "text": "_getDefaultConfig",
2485
- "canonicalReference": "@microsoft/applicationinsights-web!~_getDefaultConfig:function"
2485
+ "canonicalReference": "@microsoft/applicationinsights-web!_getDefaultConfig:function"
2486
2486
  },
2487
2487
  {
2488
2488
  "kind": "Content",
@@ -3816,6 +3816,55 @@
3816
3816
  }
3817
3817
  ]
3818
3818
  },
3819
+ {
3820
+ "kind": "Method",
3821
+ "canonicalReference": "@microsoft/applicationinsights-web!ApplicationInsights#addDependencyInitializer:member(1)",
3822
+ "docComment": "/**\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request. It is called after the dependency call has completed and any available performance details are available. A dependency initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency request so that it doesn't count against the `maxAjaxCallsPerView`.\n *\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\n *\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\n */\n",
3823
+ "excerptTokens": [
3824
+ {
3825
+ "kind": "Content",
3826
+ "text": "addDependencyInitializer(dependencyInitializer: "
3827
+ },
3828
+ {
3829
+ "kind": "Reference",
3830
+ "text": "DependencyInitializerFunction",
3831
+ "canonicalReference": "@microsoft/applicationinsights-web!DependencyInitializerFunction:type"
3832
+ },
3833
+ {
3834
+ "kind": "Content",
3835
+ "text": "): "
3836
+ },
3837
+ {
3838
+ "kind": "Reference",
3839
+ "text": "IDependencyInitializerHandler",
3840
+ "canonicalReference": "@microsoft/applicationinsights-web!IDependencyInitializerHandler:interface"
3841
+ },
3842
+ {
3843
+ "kind": "Content",
3844
+ "text": ";"
3845
+ }
3846
+ ],
3847
+ "isStatic": false,
3848
+ "returnTypeTokenRange": {
3849
+ "startIndex": 3,
3850
+ "endIndex": 4
3851
+ },
3852
+ "releaseTag": "Public",
3853
+ "isProtected": false,
3854
+ "overloadIndex": 1,
3855
+ "parameters": [
3856
+ {
3857
+ "parameterName": "dependencyInitializer",
3858
+ "parameterTypeTokenRange": {
3859
+ "startIndex": 1,
3860
+ "endIndex": 2
3861
+ },
3862
+ "isOptional": false
3863
+ }
3864
+ ],
3865
+ "isOptional": false,
3866
+ "name": "addDependencyInitializer"
3867
+ },
3819
3868
  {
3820
3869
  "kind": "Method",
3821
3870
  "canonicalReference": "@microsoft/applicationinsights-web!ApplicationInsights#addDependencyListener:member(1)",
@@ -4160,7 +4209,7 @@
4160
4209
  {
4161
4210
  "kind": "Reference",
4162
4211
  "text": "ApplicationInsights",
4163
- "canonicalReference": "@microsoft/applicationinsights-web!AnalyticsPlugin:class"
4212
+ "canonicalReference": "@microsoft/applicationinsights-web!ApplicationAnalytics:class"
4164
4213
  },
4165
4214
  {
4166
4215
  "kind": "Content",
@@ -8210,6 +8259,15 @@
8210
8259
  "text": "IInstrumentationRequirements",
8211
8260
  "canonicalReference": "@microsoft/applicationinsights-web!IInstrumentationRequirements:interface"
8212
8261
  },
8262
+ {
8263
+ "kind": "Content",
8264
+ "text": ", "
8265
+ },
8266
+ {
8267
+ "kind": "Reference",
8268
+ "text": "IDependencyListenerContainer",
8269
+ "canonicalReference": "@microsoft/applicationinsights-web!IDependencyListenerContainer:interface"
8270
+ },
8213
8271
  {
8214
8272
  "kind": "Content",
8215
8273
  "text": " "
@@ -8234,6 +8292,55 @@
8234
8292
  "overloadIndex": 1,
8235
8293
  "parameters": []
8236
8294
  },
8295
+ {
8296
+ "kind": "Method",
8297
+ "canonicalReference": "@microsoft/applicationinsights-web!DependenciesPlugin#addDependencyInitializer:member(1)",
8298
+ "docComment": "/**\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request. It is called after the dependency call has completed and any available performance details are available. A dependency initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency request so that it doesn't count against the `maxAjaxCallsPerView`.\n *\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\n *\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\n */\n",
8299
+ "excerptTokens": [
8300
+ {
8301
+ "kind": "Content",
8302
+ "text": "addDependencyInitializer(dependencyInitializer: "
8303
+ },
8304
+ {
8305
+ "kind": "Reference",
8306
+ "text": "DependencyInitializerFunction",
8307
+ "canonicalReference": "@microsoft/applicationinsights-web!DependencyInitializerFunction:type"
8308
+ },
8309
+ {
8310
+ "kind": "Content",
8311
+ "text": "): "
8312
+ },
8313
+ {
8314
+ "kind": "Reference",
8315
+ "text": "IDependencyInitializerHandler",
8316
+ "canonicalReference": "@microsoft/applicationinsights-web!IDependencyInitializerHandler:interface"
8317
+ },
8318
+ {
8319
+ "kind": "Content",
8320
+ "text": ";"
8321
+ }
8322
+ ],
8323
+ "isStatic": false,
8324
+ "returnTypeTokenRange": {
8325
+ "startIndex": 3,
8326
+ "endIndex": 4
8327
+ },
8328
+ "releaseTag": "Public",
8329
+ "isProtected": false,
8330
+ "overloadIndex": 1,
8331
+ "parameters": [
8332
+ {
8333
+ "parameterName": "dependencyInitializer",
8334
+ "parameterTypeTokenRange": {
8335
+ "startIndex": 1,
8336
+ "endIndex": 2
8337
+ },
8338
+ "isOptional": false
8339
+ }
8340
+ ],
8341
+ "isOptional": false,
8342
+ "name": "addDependencyInitializer"
8343
+ },
8237
8344
  {
8238
8345
  "kind": "Method",
8239
8346
  "canonicalReference": "@microsoft/applicationinsights-web!DependenciesPlugin#addDependencyListener:member(1)",
@@ -8284,66 +8391,72 @@
8284
8391
  "name": "addDependencyListener"
8285
8392
  },
8286
8393
  {
8287
- "kind": "Method",
8288
- "canonicalReference": "@microsoft/applicationinsights-web!DependenciesPlugin.getDefaultConfig:member(1)",
8394
+ "kind": "Property",
8395
+ "canonicalReference": "@microsoft/applicationinsights-web!DependenciesPlugin.getDefaultConfig:member",
8289
8396
  "docComment": "",
8290
8397
  "excerptTokens": [
8291
8398
  {
8292
8399
  "kind": "Content",
8293
- "text": "static getDefaultConfig(): "
8400
+ "text": "static getDefaultConfig: "
8401
+ },
8402
+ {
8403
+ "kind": "Content",
8404
+ "text": "typeof "
8294
8405
  },
8295
8406
  {
8296
8407
  "kind": "Reference",
8297
- "text": "ICorrelationConfig",
8298
- "canonicalReference": "@microsoft/applicationinsights-web!ICorrelationConfig:interface"
8408
+ "text": "_getDefaultConfig",
8409
+ "canonicalReference": "@microsoft/applicationinsights-web!_getDefaultConfig_2:function"
8299
8410
  },
8300
8411
  {
8301
8412
  "kind": "Content",
8302
8413
  "text": ";"
8303
8414
  }
8304
8415
  ],
8305
- "isStatic": true,
8306
- "returnTypeTokenRange": {
8416
+ "isReadonly": false,
8417
+ "isOptional": false,
8418
+ "releaseTag": "Public",
8419
+ "name": "getDefaultConfig",
8420
+ "propertyTypeTokenRange": {
8307
8421
  "startIndex": 1,
8308
- "endIndex": 2
8422
+ "endIndex": 3
8309
8423
  },
8310
- "releaseTag": "Public",
8311
- "isProtected": false,
8312
- "overloadIndex": 1,
8313
- "parameters": [],
8314
- "isOptional": false,
8315
- "name": "getDefaultConfig"
8424
+ "isStatic": true,
8425
+ "isProtected": false
8316
8426
  },
8317
8427
  {
8318
- "kind": "Method",
8319
- "canonicalReference": "@microsoft/applicationinsights-web!DependenciesPlugin.getEmptyConfig:member(1)",
8428
+ "kind": "Property",
8429
+ "canonicalReference": "@microsoft/applicationinsights-web!DependenciesPlugin.getEmptyConfig:member",
8320
8430
  "docComment": "",
8321
8431
  "excerptTokens": [
8322
8432
  {
8323
8433
  "kind": "Content",
8324
- "text": "static getEmptyConfig(): "
8434
+ "text": "static getEmptyConfig: "
8435
+ },
8436
+ {
8437
+ "kind": "Content",
8438
+ "text": "typeof "
8325
8439
  },
8326
8440
  {
8327
8441
  "kind": "Reference",
8328
- "text": "ICorrelationConfig",
8329
- "canonicalReference": "@microsoft/applicationinsights-web!ICorrelationConfig:interface"
8442
+ "text": "_getEmptyConfig",
8443
+ "canonicalReference": "@microsoft/applicationinsights-web!_getEmptyConfig:function"
8330
8444
  },
8331
8445
  {
8332
8446
  "kind": "Content",
8333
8447
  "text": ";"
8334
8448
  }
8335
8449
  ],
8336
- "isStatic": true,
8337
- "returnTypeTokenRange": {
8450
+ "isReadonly": false,
8451
+ "isOptional": false,
8452
+ "releaseTag": "Public",
8453
+ "name": "getEmptyConfig",
8454
+ "propertyTypeTokenRange": {
8338
8455
  "startIndex": 1,
8339
- "endIndex": 2
8456
+ "endIndex": 3
8340
8457
  },
8341
- "releaseTag": "Public",
8342
- "isProtected": false,
8343
- "overloadIndex": 1,
8344
- "parameters": [],
8345
- "isOptional": false,
8346
- "name": "getEmptyConfig"
8458
+ "isStatic": true,
8459
+ "isProtected": false
8347
8460
  },
8348
8461
  {
8349
8462
  "kind": "Property",
@@ -8869,6 +8982,10 @@
8869
8982
  {
8870
8983
  "startIndex": 5,
8871
8984
  "endIndex": 6
8985
+ },
8986
+ {
8987
+ "startIndex": 7,
8988
+ "endIndex": 8
8872
8989
  }
8873
8990
  ]
8874
8991
  },
@@ -13000,7 +13117,7 @@
13000
13117
  {
13001
13118
  "kind": "Reference",
13002
13119
  "text": "AnalyticsPlugin",
13003
- "canonicalReference": "@microsoft/applicationinsights-web!AnalyticsPlugin:class"
13120
+ "canonicalReference": "@microsoft/applicationinsights-web!ApplicationAnalytics:class"
13004
13121
  },
13005
13122
  {
13006
13123
  "kind": "Content",
@@ -13700,6 +13817,33 @@
13700
13817
  "endIndex": 2
13701
13818
  }
13702
13819
  },
13820
+ {
13821
+ "kind": "PropertySignature",
13822
+ "canonicalReference": "@microsoft/applicationinsights-web!IConfig#addIntEndpoints:member",
13823
+ "docComment": "/**\n * [Optional] Flag to indicate whether the internal looking endpoints should be automatically added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true). This flag exists as the provided regex is generic and may unexpectedly match a domain that should not be excluded.\n */\n",
13824
+ "excerptTokens": [
13825
+ {
13826
+ "kind": "Content",
13827
+ "text": "addIntEndpoints?: "
13828
+ },
13829
+ {
13830
+ "kind": "Content",
13831
+ "text": "boolean"
13832
+ },
13833
+ {
13834
+ "kind": "Content",
13835
+ "text": ";"
13836
+ }
13837
+ ],
13838
+ "isReadonly": false,
13839
+ "isOptional": true,
13840
+ "releaseTag": "Public",
13841
+ "name": "addIntEndpoints",
13842
+ "propertyTypeTokenRange": {
13843
+ "startIndex": 1,
13844
+ "endIndex": 2
13845
+ }
13846
+ },
13703
13847
  {
13704
13848
  "kind": "PropertySignature",
13705
13849
  "canonicalReference": "@microsoft/applicationinsights-web!IConfig#addRequestContext:member",
@@ -86,6 +86,9 @@ export class ApplicationAnalytics extends BaseTelemetryPlugin implements IAppIns
86
86
  // @public
87
87
  export class ApplicationInsights implements IApplicationInsights {
88
88
  constructor(snippet: Snippet);
89
+ // Warning: (ae-forgotten-export) The symbol "DependencyInitializerFunction" needs to be exported by the entry point applicationinsights-web.d.ts
90
+ // Warning: (ae-forgotten-export) The symbol "IDependencyInitializerHandler" needs to be exported by the entry point applicationinsights-web.d.ts
91
+ addDependencyInitializer(dependencyInitializer: DependencyInitializerFunction): IDependencyInitializerHandler;
89
92
  // Warning: (ae-forgotten-export) The symbol "DependencyListenerFunction" needs to be exported by the entry point applicationinsights-web.d.ts
90
93
  // Warning: (ae-forgotten-export) The symbol "IDependencyListenerHandler" needs to be exported by the entry point applicationinsights-web.d.ts
91
94
  addDependencyListener(dependencyListener: DependencyListenerFunction): IDependencyListenerHandler;
@@ -248,17 +251,21 @@ export abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
248
251
  }
249
252
 
250
253
  // Warning: (ae-forgotten-export) The symbol "IInstrumentationRequirements" needs to be exported by the entry point applicationinsights-web.d.ts
254
+ // Warning: (ae-forgotten-export) The symbol "IDependencyListenerContainer" needs to be exported by the entry point applicationinsights-web.d.ts
251
255
  //
252
256
  // @public (undocumented)
253
- export class DependenciesPlugin extends BaseTelemetryPlugin implements IDependenciesPlugin, IInstrumentationRequirements {
257
+ export class DependenciesPlugin extends BaseTelemetryPlugin implements IDependenciesPlugin, IInstrumentationRequirements, IDependencyListenerContainer {
254
258
  constructor();
259
+ addDependencyInitializer(dependencyInitializer: DependencyInitializerFunction): IDependencyInitializerHandler;
255
260
  addDependencyListener(dependencyListener: DependencyListenerFunction): IDependencyListenerHandler;
256
- // Warning: (ae-forgotten-export) The symbol "ICorrelationConfig" needs to be exported by the entry point applicationinsights-web.d.ts
261
+ // Warning: (ae-forgotten-export) The symbol "_getDefaultConfig_2" needs to be exported by the entry point applicationinsights-web.d.ts
257
262
  //
258
263
  // (undocumented)
259
- static getDefaultConfig(): ICorrelationConfig;
264
+ static getDefaultConfig: typeof _getDefaultConfig_2;
265
+ // Warning: (ae-forgotten-export) The symbol "_getEmptyConfig" needs to be exported by the entry point applicationinsights-web.d.ts
266
+ //
260
267
  // (undocumented)
261
- static getEmptyConfig(): ICorrelationConfig;
268
+ static getEmptyConfig: typeof _getEmptyConfig;
262
269
  // (undocumented)
263
270
  static identifier: string;
264
271
  // (undocumented)
@@ -682,6 +689,7 @@ export interface IAutoExceptionTelemetry {
682
689
  // @public
683
690
  export interface IConfig {
684
691
  accountId?: string;
692
+ addIntEndpoints?: boolean;
685
693
  // Warning: (ae-forgotten-export) The symbol "IRequestContext" needs to be exported by the entry point applicationinsights-web.d.ts
686
694
  addRequestContext?: (requestContext?: IRequestContext) => ICustomProperties;
687
695
  ajaxPerfLookupDelay?: number;
@@ -786,8 +794,6 @@ export interface ICustomProperties {
786
794
  [key: string]: any;
787
795
  }
788
796
 
789
- // Warning: (ae-forgotten-export) The symbol "IDependencyListenerContainer" needs to be exported by the entry point applicationinsights-web.d.ts
790
- //
791
797
  // @public (undocumented)
792
798
  export interface IDependenciesPlugin extends IDependencyListenerContainer {
793
799
  trackDependencyData(dependency: IDependencyTelemetry): void;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 3.0.0-beta.2208-19
2
+ * Microsoft.ApplicationInsights, 3.0.0-beta.2209-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -50,6 +50,12 @@ declare namespace ApplicationInsights {
50
50
  * The trace context to use for reporting the remote dependency call
51
51
  */
52
52
  eventTraceCtx: ITraceCtx;
53
+ /**
54
+ * The listener assigned context values that will be passed to any dependency initializer
55
+ */
56
+ context?: {
57
+ [key: string]: any;
58
+ };
53
59
  constructor(traceId: string, spanId: string, logger: IDiagnosticLogger, traceCtx?: IDistributedTraceContext);
54
60
  getAbsoluteUrl(): string;
55
61
  getPathName(): string;
@@ -386,6 +392,15 @@ declare namespace ApplicationInsights {
386
392
  * @returns - A IDependencyListenerHandler to enable the initializer to be removed
387
393
  */
388
394
  addDependencyListener(dependencyListener: DependencyListenerFunction): IDependencyListenerHandler;
395
+ /**
396
+ * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.
397
+ * It is called after the dependency call has completed and any available performance details are available. A dependency
398
+ * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency
399
+ * request so that it doesn't count against the `maxAjaxCallsPerView`.
400
+ * @param dependencyInitializer - The Dependency Telemetry Initializer function
401
+ * @returns - A IDependencyInitializerHandler to enable the initializer to be removed
402
+ */
403
+ addDependencyInitializer(dependencyInitializer: DependencyInitializerFunction): IDependencyInitializerHandler;
389
404
  /**
390
405
  * Gets the current distributed trace context for this instance if available
391
406
  */
@@ -648,10 +663,10 @@ declare namespace ApplicationInsights {
648
663
  Aggregation = 1
649
664
  }
650
665
 
651
- class DependenciesPlugin extends BaseTelemetryPlugin implements IDependenciesPlugin, IInstrumentationRequirements {
666
+ class DependenciesPlugin extends BaseTelemetryPlugin implements IDependenciesPlugin, IInstrumentationRequirements, IDependencyListenerContainer {
652
667
  static identifier: string;
653
- static getDefaultConfig(): ICorrelationConfig;
654
- static getEmptyConfig(): ICorrelationConfig;
668
+ static getDefaultConfig: typeof _getDefaultConfig_2;
669
+ static getEmptyConfig: typeof _getEmptyConfig;
655
670
  identifier: string;
656
671
  priority: number;
657
672
  constructor();
@@ -672,6 +687,15 @@ declare namespace ApplicationInsights {
672
687
  * @returns - A IDependencyListenerHandler to enable the initializer to be removed
673
688
  */
674
689
  addDependencyListener(dependencyListener: DependencyListenerFunction): IDependencyListenerHandler;
690
+ /**
691
+ * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.
692
+ * It is called after the dependency call has completed and any available performance details are available. A dependency
693
+ * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency
694
+ * request so that it doesn't count against the `maxAjaxCallsPerView`.
695
+ * @param dependencyInitializer - The Dependency Telemetry Initializer function
696
+ * @returns - A IDependencyInitializerHandler to enable the initializer to be removed
697
+ */
698
+ addDependencyInitializer(dependencyInitializer: DependencyInitializerFunction): IDependencyInitializerHandler;
675
699
  /**
676
700
  * Protected function to allow sub classes the chance to add additional properties to the dependency event
677
701
  * before it's sent. This function calls track, so sub-classes must call this function after they have
@@ -685,6 +709,15 @@ declare namespace ApplicationInsights {
685
709
  }): void;
686
710
  }
687
711
 
712
+ /**
713
+ * The initializer function that will be called, if it returns false the event will be dropped and not reported
714
+ * or counted against the `maxAjaxCallsPerView`.
715
+ */
716
+ type DependencyInitializerFunction = (item: IDependencyInitializerDetails) => boolean | void;
717
+
718
+ /**
719
+ * The function that will get called when the ajax request is about to occur.
720
+ */
688
721
  type DependencyListenerFunction = (dependencyDetails: IDependencyListenerDetails) => void;
689
722
 
690
723
  const DistributedTracingModes: EnumValue<typeof eDistributedTracingModes>;
@@ -703,7 +736,7 @@ declare namespace ApplicationInsights {
703
736
 
704
737
  const _DYN_HEADER_MAP = "headerMap";
705
738
 
706
- const _DYN_INCLUDE_CORRELATION_3 = "includeCorrelationHeaders";
739
+ const _DYN_INCLUDE_CORRELATION_2 = "includeCorrelationHeaders";
707
740
 
708
741
  const enum eDistributedTracingModes {
709
742
  /**
@@ -934,6 +967,10 @@ declare namespace ApplicationInsights {
934
967
 
935
968
  function _getDefaultConfig(config?: IConfig): IConfig;
936
969
 
970
+ function _getDefaultConfig_2(): ICorrelationConfig;
971
+
972
+ function _getEmptyConfig(): ICorrelationConfig;
973
+
937
974
  const enum GetExtCfgMergeType {
938
975
  None = 0,
939
976
  MergeDefaultOnly = 1,
@@ -1626,6 +1663,13 @@ declare namespace ApplicationInsights {
1626
1663
  * @defaultValue true
1627
1664
  */
1628
1665
  disableIkeyDeprecationMessage?: boolean;
1666
+ /**
1667
+ * [Optional] Flag to indicate whether the internal looking endpoints should be automatically
1668
+ * added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true).
1669
+ * This flag exists as the provided regex is generic and may unexpectedly match a domain that
1670
+ * should not be excluded.
1671
+ */
1672
+ addIntEndpoints?: boolean;
1629
1673
  }
1630
1674
 
1631
1675
  /**
@@ -1828,6 +1872,18 @@ declare namespace ApplicationInsights {
1828
1872
  * Specifies the path to use for the cookie, defaults to '/'
1829
1873
  */
1830
1874
  path?: string;
1875
+ /**
1876
+ * Specify the cookie name(s) to be ignored, this will cause any matching cookie name to never be read or written.
1877
+ * They may still be explicitly purged or deleted. You do not need to repeat the name in the `blockedCookies`
1878
+ * configuration.(Since v2.8.8)
1879
+ */
1880
+ ignoreCookies?: string[];
1881
+ /**
1882
+ * Specify the cookie name(s) to never be written, this will cause any cookie name to never be created or updated,
1883
+ * they will still be read unless also included in the ignoreCookies and may still be explicitly purged or deleted.
1884
+ * If not provided defaults to the same list provided in ignoreCookies. (Since v2.8.8)
1885
+ */
1886
+ blockedCookies?: string[];
1831
1887
  /**
1832
1888
  * Hook function to fetch the named cookie value.
1833
1889
  * @param name - The name of the cookie
@@ -1897,6 +1953,13 @@ declare namespace ApplicationInsights {
1897
1953
  * Default is undefined.
1898
1954
  */
1899
1955
  addRequestContext?: (requestContext?: IRequestContext) => ICustomProperties;
1956
+ /**
1957
+ * [Optional] Flag to indicate whether the internal looking endpoints should be automatically
1958
+ * added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true).
1959
+ * This flag exists as the provided regex is generic and may unexpectedly match a domain that
1960
+ * should not be excluded.
1961
+ */
1962
+ addIntEndpoints?: boolean;
1900
1963
  }
1901
1964
 
1902
1965
  interface ICustomProperties {
@@ -1945,6 +2008,38 @@ declare namespace ApplicationInsights {
1945
2008
  trackDependencyData(dependency: IDependencyTelemetry): void;
1946
2009
  }
1947
2010
 
2011
+ interface IDependencyHandler {
2012
+ remove(): void;
2013
+ }
2014
+
2015
+ interface IDependencyInitializerDetails {
2016
+ /**
2017
+ * The DependencyTelemetry event that will be passed to the `trackDependencyDataInternal` function.
2018
+ */
2019
+ item: IDependencyTelemetry;
2020
+ /**
2021
+ * Additional properties to be added to the event
2022
+ */
2023
+ properties?: {
2024
+ [key: string]: any;
2025
+ };
2026
+ /**
2027
+ * Additional system properties to be added to the event.
2028
+ */
2029
+ sysProperties?: {
2030
+ [key: string]: any;
2031
+ };
2032
+ /**
2033
+ * The context that the application can assigned via the dependency listener(s)
2034
+ */
2035
+ context?: {
2036
+ [key: string]: any;
2037
+ };
2038
+ }
2039
+
2040
+ interface IDependencyInitializerHandler extends IDependencyHandler {
2041
+ }
2042
+
1948
2043
  interface IDependencyListenerContainer {
1949
2044
  /**
1950
2045
  * Add an ajax listener which is called just prior to the request being sent and before the correlation headers are added, to allow you
@@ -1992,10 +2087,15 @@ declare namespace ApplicationInsights {
1992
2087
  * https://www.w3.org/TR/trace-context/#trace-flags
1993
2088
  */
1994
2089
  traceFlags?: number;
2090
+ /**
2091
+ * [Optional] Context that the application can assign that will also be passed to any dependency initializer
2092
+ */
2093
+ context?: {
2094
+ [key: string]: any;
2095
+ };
1995
2096
  }
1996
2097
 
1997
- interface IDependencyListenerHandler {
1998
- remove(): void;
2098
+ interface IDependencyListenerHandler extends IDependencyHandler {
1999
2099
  }
2000
2100
 
2001
2101
  /**
@@ -2338,7 +2438,7 @@ declare namespace ApplicationInsights {
2338
2438
  }
2339
2439
 
2340
2440
  interface IInstrumentationRequirements extends IDependenciesPlugin {
2341
- [_DYN_INCLUDE_CORRELATION_3]: (ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit, xhr?: XMLHttpRequestInstrumented) => any;
2441
+ [_DYN_INCLUDE_CORRELATION_2]: (ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit, xhr?: XMLHttpRequestInstrumented) => any;
2342
2442
  }
2343
2443
 
2344
2444
  interface IInstrumentCallDetails {