@microsoft/applicationinsights-properties-js 3.0.0-beta.2210-01 → 3.0.0-beta.2210-02
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-properties-js.integrity.json +9 -9
- package/browser/applicationinsights-properties-js.js +938 -495
- package/browser/applicationinsights-properties-js.js.map +1 -1
- package/browser/applicationinsights-properties-js.min.js +2 -2
- package/browser/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.api.json +21 -169
- package/dist/applicationinsights-properties-js.api.md +9 -20
- package/dist/applicationinsights-properties-js.d.ts +28 -33
- package/dist/applicationinsights-properties-js.js +938 -495
- package/dist/applicationinsights-properties-js.js.map +1 -1
- package/dist/applicationinsights-properties-js.min.js +2 -2
- package/dist/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.rollup.d.ts +28 -33
- package/dist-esm/Context/Application.js +1 -1
- package/dist-esm/Context/Device.js +1 -1
- package/dist-esm/Context/Internal.js +3 -3
- package/dist-esm/Context/Internal.js.map +1 -1
- package/dist-esm/Context/Location.js +1 -1
- package/dist-esm/Context/Session.js +30 -35
- package/dist-esm/Context/Session.js.map +1 -1
- package/dist-esm/Context/TelemetryTrace.js +1 -1
- package/dist-esm/Context/User.js +54 -46
- package/dist-esm/Context/User.js.map +1 -1
- package/dist-esm/Interfaces/IPropTelemetryContext.js +1 -1
- package/dist-esm/Interfaces/{ITelemetryConfig.js → IPropertiesConfig.js} +2 -2
- package/dist-esm/Interfaces/IPropertiesConfig.js.map +1 -0
- package/dist-esm/PropertiesPlugin.js +57 -50
- package/dist-esm/PropertiesPlugin.js.map +1 -1
- package/dist-esm/TelemetryContext.js +7 -5
- package/dist-esm/TelemetryContext.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +8 -13
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-properties-js.js +1 -1
- package/package.json +4 -4
- package/src/Context/Internal.ts +10 -9
- package/src/Context/Session.ts +33 -45
- package/src/Context/User.ts +67 -56
- package/src/Interfaces/IPropertiesConfig.ts +20 -0
- package/src/PropertiesPlugin.ts +58 -54
- package/src/TelemetryContext.ts +8 -4
- package/src/__DynamicConstants.ts +7 -12
- package/types/Context/Internal.d.ts +2 -2
- package/types/Context/Session.d.ts +7 -11
- package/types/Context/User.d.ts +5 -5
- package/types/Interfaces/IPropertiesConfig.d.ts +17 -0
- package/types/PropertiesPlugin.d.ts +1 -3
- package/types/TelemetryContext.d.ts +2 -2
- package/types/__DynamicConstants.d.ts +1 -6
- package/dist-esm/Interfaces/ITelemetryConfig.js.map +0 -1
- package/src/Interfaces/ITelemetryConfig.ts +0 -20
- package/types/Interfaces/ITelemetryConfig.d.ts +0 -17
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ISession } from "@microsoft/applicationinsights-common";
|
|
2
2
|
import { IAppInsightsCore } from "@microsoft/applicationinsights-core-js";
|
|
3
3
|
export interface ISessionConfig {
|
|
4
|
-
sessionRenewalMs?:
|
|
5
|
-
sessionExpirationMs?:
|
|
6
|
-
namePrefix?:
|
|
7
|
-
sessionCookiePostfix?:
|
|
8
|
-
idLength?:
|
|
9
|
-
getNewId?: (
|
|
4
|
+
readonly sessionRenewalMs?: number;
|
|
5
|
+
readonly sessionExpirationMs?: number;
|
|
6
|
+
readonly namePrefix?: string;
|
|
7
|
+
readonly sessionCookiePostfix?: string;
|
|
8
|
+
readonly idLength?: number;
|
|
9
|
+
readonly getNewId?: (idLength?: number) => string;
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Avoid using this value to override the cookie manager cookie domain.
|
|
12
12
|
*/
|
|
13
|
-
cookieDomain?:
|
|
13
|
+
cookieDomain?: string;
|
|
14
14
|
}
|
|
15
15
|
export declare class Session implements ISession {
|
|
16
16
|
/**
|
|
@@ -30,11 +30,7 @@ export declare class Session implements ISession {
|
|
|
30
30
|
renewalDate?: number;
|
|
31
31
|
}
|
|
32
32
|
export declare class _SessionManager {
|
|
33
|
-
static acquisitionSpan: number;
|
|
34
|
-
static renewalSpan: number;
|
|
35
|
-
static cookieUpdateInterval: number;
|
|
36
33
|
automaticSession: Session;
|
|
37
|
-
config: ISessionConfig;
|
|
38
34
|
constructor(config: ISessionConfig, core?: IAppInsightsCore);
|
|
39
35
|
update(): void;
|
|
40
36
|
/**
|
package/types/Context/User.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IUserContext } from "@microsoft/applicationinsights-common";
|
|
2
2
|
import { IAppInsightsCore } from "@microsoft/applicationinsights-core-js";
|
|
3
|
-
import {
|
|
3
|
+
import { IPropertiesConfig } from "../Interfaces/IPropertiesConfig";
|
|
4
4
|
export declare class User implements IUserContext {
|
|
5
5
|
static cookieSeparator: string;
|
|
6
6
|
static userCookieName: string;
|
|
@@ -8,7 +8,7 @@ export declare class User implements IUserContext {
|
|
|
8
8
|
/**
|
|
9
9
|
* The telemetry configuration.
|
|
10
10
|
*/
|
|
11
|
-
config:
|
|
11
|
+
readonly config: IPropertiesConfig;
|
|
12
12
|
/**
|
|
13
13
|
* The user ID.
|
|
14
14
|
*/
|
|
@@ -37,12 +37,12 @@ export declare class User implements IUserContext {
|
|
|
37
37
|
* A flag indicating whether the user cookie has been set
|
|
38
38
|
*/
|
|
39
39
|
isUserCookieSet: boolean;
|
|
40
|
-
constructor(config:
|
|
40
|
+
constructor(config: IPropertiesConfig, core: IAppInsightsCore);
|
|
41
41
|
/**
|
|
42
42
|
* Sets the authenticated user id and the account id in this session.
|
|
43
43
|
*
|
|
44
|
-
* @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.
|
|
45
|
-
* @param accountId {string} - An optional string to represent the account associated with the authenticated user.
|
|
44
|
+
* @param authenticatedUserId - {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.
|
|
45
|
+
* @param accountId - {string} - An optional string to represent the account associated with the authenticated user.
|
|
46
46
|
*/
|
|
47
47
|
setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie?: boolean): void;
|
|
48
48
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IPropertiesConfig {
|
|
2
|
+
readonly instrumentationKey: string;
|
|
3
|
+
readonly accountId: string;
|
|
4
|
+
readonly sessionRenewalMs: number;
|
|
5
|
+
readonly samplingPercentage: number;
|
|
6
|
+
readonly sessionExpirationMs: number;
|
|
7
|
+
readonly cookieDomain: string;
|
|
8
|
+
readonly sdkExtension: string;
|
|
9
|
+
readonly isBrowserLinkTrackingEnabled: boolean;
|
|
10
|
+
readonly appId: string;
|
|
11
|
+
readonly getSessionId: string;
|
|
12
|
+
readonly namePrefix: string;
|
|
13
|
+
readonly sessionCookiePostfix: string;
|
|
14
|
+
readonly userCookiePostfix: string;
|
|
15
|
+
readonly idLength: number;
|
|
16
|
+
readonly getNewId: (idLength?: number) => string;
|
|
17
|
+
}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
import { IConfig, IPropertiesPlugin } from "@microsoft/applicationinsights-common";
|
|
6
6
|
import { BaseTelemetryPlugin, IAppInsightsCore, IConfiguration, IPlugin, IProcessTelemetryContext, ITelemetryItem, ITelemetryPluginChain } from "@microsoft/applicationinsights-core-js";
|
|
7
7
|
import { IPropTelemetryContext } from "./Interfaces/IPropTelemetryContext";
|
|
8
|
-
import { ITelemetryConfig } from "./Interfaces/ITelemetryConfig";
|
|
9
8
|
export default class PropertiesPlugin extends BaseTelemetryPlugin implements IPropertiesPlugin {
|
|
10
|
-
static getDefaultConfig(): ITelemetryConfig;
|
|
11
9
|
context: IPropTelemetryContext;
|
|
12
10
|
priority: number;
|
|
13
11
|
identifier: string;
|
|
@@ -15,7 +13,7 @@ export default class PropertiesPlugin extends BaseTelemetryPlugin implements IPr
|
|
|
15
13
|
initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
16
14
|
/**
|
|
17
15
|
* Add Part A fields to the event
|
|
18
|
-
* @param event The event that needs to be processed
|
|
16
|
+
* @param event - The event that needs to be processed
|
|
19
17
|
*/
|
|
20
18
|
processTelemetry(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
21
19
|
}
|
|
@@ -6,7 +6,7 @@ import { IApplication, IDevice, IInternal, ILocation, IOperatingSystem, ISession
|
|
|
6
6
|
import { IAppInsightsCore, IDistributedTraceContext, IProcessTelemetryContext, ITelemetryItem } from "@microsoft/applicationinsights-core-js";
|
|
7
7
|
import { _SessionManager } from "./Context/Session";
|
|
8
8
|
import { IPropTelemetryContext } from "./Interfaces/IPropTelemetryContext";
|
|
9
|
-
import {
|
|
9
|
+
import { IPropertiesConfig } from "./Interfaces/IPropertiesConfig";
|
|
10
10
|
export declare class TelemetryContext implements IPropTelemetryContext {
|
|
11
11
|
application: IApplication;
|
|
12
12
|
device: IDevice;
|
|
@@ -20,7 +20,7 @@ export declare class TelemetryContext implements IPropTelemetryContext {
|
|
|
20
20
|
web: IWeb;
|
|
21
21
|
appId: () => string;
|
|
22
22
|
getSessionId: () => string;
|
|
23
|
-
constructor(core: IAppInsightsCore, defaultConfig:
|
|
23
|
+
constructor(core: IAppInsightsCore, defaultConfig: IPropertiesConfig, previousTraceCtx?: IDistributedTraceContext);
|
|
24
24
|
applySessionContext(evt: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
25
25
|
applyOperatingSystemContxt(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
26
26
|
applyApplicationContext(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
@@ -13,7 +13,6 @@ export declare const _DYN_APPLY_OPERATING_SYST3 = "applyOperatingSystemContxt";
|
|
|
13
13
|
export declare const _DYN_APPLY_LOCATION_CONTE4 = "applyLocationContext";
|
|
14
14
|
export declare const _DYN_APPLY_INTERNAL_CONTE5 = "applyInternalContext";
|
|
15
15
|
export declare const _DYN_ACCOUNT_ID = "accountId";
|
|
16
|
-
export declare const _DYN_SDK_EXTENSION = "sdkExtension";
|
|
17
16
|
export declare const _DYN_GET_SESSION_ID = "getSessionId";
|
|
18
17
|
export declare const _DYN_NAME_PREFIX = "namePrefix";
|
|
19
18
|
export declare const _DYN_SESSION_COOKIE_POSTF6 = "sessionCookiePostfix";
|
|
@@ -23,12 +22,8 @@ export declare const _DYN_GET_NEW_ID = "getNewId";
|
|
|
23
22
|
export declare const _DYN_LENGTH = "length";
|
|
24
23
|
export declare const _DYN_AUTOMATIC_SESSION = "automaticSession";
|
|
25
24
|
export declare const _DYN_AUTHENTICATED_ID = "authenticatedId";
|
|
26
|
-
export declare const _DYN_SESSION_EXPIRATION_M7 = "sessionExpirationMs";
|
|
27
|
-
export declare const _DYN_SESSION_RENEWAL_MS = "sessionRenewalMs";
|
|
28
|
-
export declare const _DYN_CONFIG = "config";
|
|
29
25
|
export declare const _DYN_ACQUISITION_DATE = "acquisitionDate";
|
|
30
26
|
export declare const _DYN_RENEWAL_DATE = "renewalDate";
|
|
31
|
-
export declare const _DYN_COOKIE_DOMAIN = "cookieDomain";
|
|
32
27
|
export declare const _DYN_JOIN = "join";
|
|
33
28
|
export declare const _DYN_COOKIE_SEPARATOR = "cookieSeparator";
|
|
34
|
-
export declare const
|
|
29
|
+
export declare const _DYN_AUTH_USER_COOKIE_NAM7 = "authUserCookieName";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ITelemetryConfig.js.map","sources":["ITelemetryConfig.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport {};\r\n//# sourceMappingURL=ITelemetryConfig.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
export interface ITelemetryConfig {
|
|
5
|
-
instrumentationKey: () => string;
|
|
6
|
-
accountId: () => string;
|
|
7
|
-
sessionRenewalMs: () => number;
|
|
8
|
-
samplingPercentage: () => number;
|
|
9
|
-
sessionExpirationMs: () => number;
|
|
10
|
-
cookieDomain: () => null,
|
|
11
|
-
sdkExtension: () => string;
|
|
12
|
-
isBrowserLinkTrackingEnabled: () => boolean;
|
|
13
|
-
appId: () => string;
|
|
14
|
-
getSessionId: () => string;
|
|
15
|
-
namePrefix: () => string;
|
|
16
|
-
sessionCookiePostfix: () => string;
|
|
17
|
-
userCookiePostfix: () => string;
|
|
18
|
-
idLength: () => number;
|
|
19
|
-
getNewId: () => (idLength?: number) => string;
|
|
20
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface ITelemetryConfig {
|
|
2
|
-
instrumentationKey: () => string;
|
|
3
|
-
accountId: () => string;
|
|
4
|
-
sessionRenewalMs: () => number;
|
|
5
|
-
samplingPercentage: () => number;
|
|
6
|
-
sessionExpirationMs: () => number;
|
|
7
|
-
cookieDomain: () => null;
|
|
8
|
-
sdkExtension: () => string;
|
|
9
|
-
isBrowserLinkTrackingEnabled: () => boolean;
|
|
10
|
-
appId: () => string;
|
|
11
|
-
getSessionId: () => string;
|
|
12
|
-
namePrefix: () => string;
|
|
13
|
-
sessionCookiePostfix: () => string;
|
|
14
|
-
userCookiePostfix: () => string;
|
|
15
|
-
idLength: () => number;
|
|
16
|
-
getNewId: () => (idLength?: number) => string;
|
|
17
|
-
}
|