@microsoft/applicationinsights-dependencies-js 3.0.0-beta.2208-16 → 3.0.0-beta.2209-01
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.
- package/browser/applicationinsights-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +149 -102
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +2 -2
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.api.json +667 -30
- package/dist/applicationinsights-dependencies-js.api.md +63 -9
- package/dist/applicationinsights-dependencies-js.d.ts +73 -8
- package/dist/applicationinsights-dependencies-js.js +149 -102
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +2 -2
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +75 -10
- package/dist-esm/DependencyInitializer.js +6 -0
- package/dist-esm/DependencyInitializer.js.map +1 -0
- package/dist-esm/DependencyListener.js +1 -1
- package/dist-esm/InternalConstants.js +1 -1
- package/dist-esm/__DynamicConstants.js +6 -6
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/ajax.js +153 -98
- package/dist-esm/ajax.js.map +1 -1
- package/dist-esm/ajaxRecord.js +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +3 -3
- package/src/DependencyInitializer.ts +44 -0
- package/src/DependencyListener.ts +13 -3
- package/src/__DynamicConstants.ts +5 -5
- package/src/ajax.ts +183 -106
- package/src/ajaxRecord.ts +5 -0
- package/src/applicationinsights-dependencies-js.ts +5 -1
- package/types/DependencyInitializer.d.ts +41 -0
- package/types/DependencyListener.d.ts +14 -3
- package/types/__DynamicConstants.d.ts +4 -4
- package/types/ajax.d.ts +18 -5
- package/types/ajaxRecord.d.ts +6 -0
- package/types/applicationinsights-dependencies-js.d.ts +2 -0
package/types/ajax.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IConfig, ICorrelationConfig, IDependencyTelemetry } from "@microsoft/applicationinsights-common";
|
|
2
2
|
import { BaseTelemetryPlugin, IAppInsightsCore, IConfiguration, IPlugin, IProcessTelemetryContext, ITelemetryItem, ITelemetryPluginChain } from "@microsoft/applicationinsights-core-js";
|
|
3
|
+
import { DependencyInitializerFunction, IDependencyInitializerHandler } from "./DependencyInitializer";
|
|
3
4
|
import { DependencyListenerFunction, IDependencyListenerContainer, IDependencyListenerHandler } from "./DependencyListener";
|
|
4
|
-
import {
|
|
5
|
+
import { _DYN_INCLUDE_CORRELATION_2 } from "./__DynamicConstants";
|
|
5
6
|
import { ajaxRecord } from "./ajaxRecord";
|
|
6
7
|
export interface XMLHttpRequestInstrumented extends XMLHttpRequest {
|
|
7
8
|
ajaxData: ajaxRecord;
|
|
@@ -15,12 +16,14 @@ export interface IDependenciesPlugin extends IDependencyListenerContainer {
|
|
|
15
16
|
trackDependencyData(dependency: IDependencyTelemetry): void;
|
|
16
17
|
}
|
|
17
18
|
export interface IInstrumentationRequirements extends IDependenciesPlugin {
|
|
18
|
-
[
|
|
19
|
+
[_DYN_INCLUDE_CORRELATION_2]: (ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit, xhr?: XMLHttpRequestInstrumented) => any;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
declare function _getDefaultConfig(): ICorrelationConfig;
|
|
22
|
+
declare function _getEmptyConfig(): ICorrelationConfig;
|
|
23
|
+
export declare class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlugin, IInstrumentationRequirements, IDependencyListenerContainer {
|
|
21
24
|
static identifier: string;
|
|
22
|
-
static getDefaultConfig
|
|
23
|
-
static getEmptyConfig
|
|
25
|
+
static getDefaultConfig: typeof _getDefaultConfig;
|
|
26
|
+
static getEmptyConfig: typeof _getEmptyConfig;
|
|
24
27
|
identifier: string;
|
|
25
28
|
priority: number;
|
|
26
29
|
constructor();
|
|
@@ -41,6 +44,15 @@ export declare class AjaxMonitor extends BaseTelemetryPlugin implements IDepende
|
|
|
41
44
|
* @returns - A IDependencyListenerHandler to enable the initializer to be removed
|
|
42
45
|
*/
|
|
43
46
|
addDependencyListener(dependencyListener: DependencyListenerFunction): IDependencyListenerHandler;
|
|
47
|
+
/**
|
|
48
|
+
* Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.
|
|
49
|
+
* It is called after the dependency call has completed and any available performance details are available. A dependency
|
|
50
|
+
* initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency
|
|
51
|
+
* request so that it doesn't count against the `maxAjaxCallsPerView`.
|
|
52
|
+
* @param dependencyInitializer - The Dependency Telemetry Initializer function
|
|
53
|
+
* @returns - A IDependencyInitializerHandler to enable the initializer to be removed
|
|
54
|
+
*/
|
|
55
|
+
addDependencyInitializer(dependencyInitializer: DependencyInitializerFunction): IDependencyInitializerHandler;
|
|
44
56
|
/**
|
|
45
57
|
* Protected function to allow sub classes the chance to add additional properties to the dependency event
|
|
46
58
|
* before it's sent. This function calls track, so sub-classes must call this function after they have
|
|
@@ -53,3 +65,4 @@ export declare class AjaxMonitor extends BaseTelemetryPlugin implements IDepende
|
|
|
53
65
|
[key: string]: any;
|
|
54
66
|
}): void;
|
|
55
67
|
}
|
|
68
|
+
export {};
|
package/types/ajaxRecord.d.ts
CHANGED
|
@@ -63,6 +63,12 @@ export declare class ajaxRecord {
|
|
|
63
63
|
* The trace context to use for reporting the remote dependency call
|
|
64
64
|
*/
|
|
65
65
|
eventTraceCtx: ITraceCtx;
|
|
66
|
+
/**
|
|
67
|
+
* The listener assigned context values that will be passed to any dependency initializer
|
|
68
|
+
*/
|
|
69
|
+
context?: {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
};
|
|
66
72
|
constructor(traceId: string, spanId: string, logger: IDiagnosticLogger, traceCtx?: IDistributedTraceContext);
|
|
67
73
|
getAbsoluteUrl(): string;
|
|
68
74
|
getPathName(): string;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { AjaxMonitor as AjaxPlugin, IDependenciesPlugin, XMLHttpRequestInstrumented, IInstrumentationRequirements, DfltAjaxCorrelationHeaderExDomains } from "./ajax";
|
|
2
2
|
export { ajaxRecord } from "./ajaxRecord";
|
|
3
|
+
export { IDependencyHandler, IDependencyListenerHandler, IDependencyListenerDetails, DependencyListenerFunction } from "./DependencyListener";
|
|
4
|
+
export { IDependencyInitializerHandler, IDependencyInitializerDetails, DependencyInitializerFunction } from "./DependencyInitializer";
|