@sap-ux/telemetry 0.5.72 → 0.5.74
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/dist/base/client/azure-appinsight-client.d.ts +3 -10
- package/dist/base/client/azure-appinsight-client.js +17 -7
- package/dist/base/interceptor/config.js +17 -7
- package/dist/base/types/event.d.ts +7 -0
- package/dist/base/types/event.js +3 -0
- package/dist/base/types/index.d.ts +1 -0
- package/dist/base/types/index.js +1 -0
- package/dist/base/utils/param-processing.d.ts +2 -1
- package/dist/base/utils/reporting.js +17 -7
- package/dist/index.d.ts +2 -1
- package/dist/tooling-telemetry/telemetry-client.d.ts +2 -6
- package/dist/tooling-telemetry/types.d.ts +1 -7
- package/package.json +3 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Client } from './client';
|
|
2
2
|
import { SampleRate } from '../types/sample-rate';
|
|
3
|
+
import type { TelemetryMeasurements, TelemetryProperties } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
*/
|
|
@@ -25,11 +26,7 @@ declare class ApplicationInsightClient extends Client {
|
|
|
25
26
|
* @param ignoreSettings Ignore telemetryEnabled settings and skip submitting telemetry data
|
|
26
27
|
* @returns Promise<void>
|
|
27
28
|
*/
|
|
28
|
-
reportBlocking(eventName: string, properties:
|
|
29
|
-
[key: string]: string | boolean;
|
|
30
|
-
}, measurements: {
|
|
31
|
-
[key: string]: number;
|
|
32
|
-
}, sampleRate: SampleRate | undefined, ignoreSettings?: boolean): Promise<void>;
|
|
29
|
+
reportBlocking(eventName: string, properties: TelemetryProperties, measurements: TelemetryMeasurements, sampleRate: SampleRate | undefined, ignoreSettings?: boolean): Promise<void>;
|
|
33
30
|
/**
|
|
34
31
|
* Send a telemetry event to Azure Application Insights. The telemetry event sending is still non-blocking
|
|
35
32
|
* in this API. To make sure telemetry event is sent to Azure backend before next statement, please see
|
|
@@ -42,11 +39,7 @@ declare class ApplicationInsightClient extends Client {
|
|
|
42
39
|
* @param telemetryHelperProperties Properties that are passed to specific TelemetryClient for generating specific properties (E.g. ToolsSuiteTelemetryClient)
|
|
43
40
|
* @param ignoreSettings Ignore telemetryEnabled settings and skip submitting telemetry data
|
|
44
41
|
*/
|
|
45
|
-
report(eventName: string, properties: {
|
|
46
|
-
[key: string]: string | boolean;
|
|
47
|
-
}, measurements: {
|
|
48
|
-
[key: string]: number;
|
|
49
|
-
}, sampleRate: SampleRate | undefined, telemetryHelperProperties?: {
|
|
42
|
+
report(eventName: string, properties: TelemetryProperties, measurements: TelemetryMeasurements, sampleRate: SampleRate | undefined, telemetryHelperProperties?: {
|
|
50
43
|
[key: string]: string;
|
|
51
44
|
}, ignoreSettings?: boolean): Promise<void>;
|
|
52
45
|
/**
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.ApplicationInsightClient = void 0;
|
|
27
37
|
const client_1 = require("./client");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.asyncInterceptorTypesMapping = exports.interceptorTypesMapping = exports.InterceptorTypes = void 0;
|
|
27
37
|
const interceptors = __importStar(require("./index"));
|
package/dist/base/types/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./event"), exports);
|
|
17
18
|
__exportStar(require("./event-header"), exports);
|
|
18
19
|
__exportStar(require("./event-name"), exports);
|
|
19
20
|
__exportStar(require("./project-info"), exports);
|
|
@@ -41,6 +41,7 @@ export declare class ParamRecordConfig {
|
|
|
41
41
|
export declare const wrongPathErr: (field: string, index: number) => Error;
|
|
42
42
|
export declare const getValue: (obj: any, path: string, field: string, paramIndex: number) => number | string;
|
|
43
43
|
export declare const paramsProcessing: (params: any, instructions: ParamRecordConfig) => [dimensions, measurements];
|
|
44
|
-
export declare const getParamsData: (params: any,
|
|
44
|
+
export declare const getParamsData: (params: any, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
45
|
+
instructions: ParamRecordConfig[] | ParamRecordConfig) => [dimensions, measurements];
|
|
45
46
|
export {};
|
|
46
47
|
//# sourceMappingURL=param-processing.d.ts.map
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.reportEnableTelemetryOnOff = exports.reportRuntimeError = void 0;
|
|
27
37
|
const appInsights = __importStar(require("applicationinsights"));
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export { ApplicationInsightClient } from './base/client/azure-appinsight-client'
|
|
|
4
4
|
export { EventHeader } from './base/types/event-header';
|
|
5
5
|
export { EventName } from './base/types/event-name';
|
|
6
6
|
export { SampleRate } from './base/types/sample-rate';
|
|
7
|
-
export {
|
|
7
|
+
export { TelemetryMeasurements, TelemetryProperties } from './base/types/event';
|
|
8
|
+
export { initTelemetrySettings, setEnableTelemetry, getTelemetrySetting, ToolsSuiteTelemetryClient, ToolsSuiteTelemetryInitSettings, TelemetryHelperProperties, TelemetryEvent, ToolsId } from './tooling-telemetry';
|
|
8
9
|
export { InterceptorTypes } from './base/interceptor/config';
|
|
9
10
|
export { PerformanceMeasurementAPI } from './base/performance/api';
|
|
10
11
|
export { ParamRecordConfig, ParamRecordConfigField } from './base/utils/param-processing';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApplicationInsightClient } from '../base/client/azure-appinsight-client';
|
|
2
|
-
import type { SampleRate } from '../base/types
|
|
2
|
+
import type { SampleRate, TelemetryMeasurements, TelemetryProperties } from '../base/types';
|
|
3
3
|
import type { TelemetryHelperProperties, TelemetryEvent } from './types';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -24,11 +24,7 @@ declare class ToolsSuiteTelemetryClient extends ApplicationInsightClient {
|
|
|
24
24
|
* @param ignoreSettings Ignore telemetryEnabled settings and skip submitting telemetry data
|
|
25
25
|
* @returns Promise<void>
|
|
26
26
|
*/
|
|
27
|
-
report(eventName: string, properties:
|
|
28
|
-
[key: string]: string;
|
|
29
|
-
}, measurements: {
|
|
30
|
-
[key: string]: number;
|
|
31
|
-
}, sampleRate: SampleRate | undefined, telemetryHelperProperties?: TelemetryHelperProperties, ignoreSettings?: boolean): Promise<void>;
|
|
27
|
+
report(eventName: string, properties: TelemetryProperties, measurements: TelemetryMeasurements, sampleRate: SampleRate | undefined, telemetryHelperProperties?: TelemetryHelperProperties, ignoreSettings?: boolean): Promise<void>;
|
|
32
28
|
/**
|
|
33
29
|
* Send a telemetry event to Azure Application Insights.
|
|
34
30
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectInfo } from '../base/types';
|
|
1
|
+
import type { ProjectInfo, TelemetryMeasurements, TelemetryProperties } from '../base/types';
|
|
2
2
|
import type { AppType } from '@sap-ux/project-access/dist/types';
|
|
3
3
|
export type TelemetryHelperProperties = {
|
|
4
4
|
appPath: string;
|
|
@@ -72,12 +72,6 @@ export interface CommonFioriProjectProperties extends TelemetryProperties {
|
|
|
72
72
|
[CommonProperties.TemplateVersion]: string;
|
|
73
73
|
[CommonProperties.ApplicationType]: AppType;
|
|
74
74
|
}
|
|
75
|
-
export interface TelemetryProperties {
|
|
76
|
-
[key: string]: string | boolean;
|
|
77
|
-
}
|
|
78
|
-
export interface TelemetryMeasurements {
|
|
79
|
-
[key: string]: number;
|
|
80
|
-
}
|
|
81
75
|
export type TelemetryEvent = {
|
|
82
76
|
eventName: string;
|
|
83
77
|
properties: TelemetryProperties;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/telemetry",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.74",
|
|
4
4
|
"description": "Library for sending usage telemetry data",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"performance-now": "2.1.0",
|
|
20
20
|
"yaml": "2.3.3",
|
|
21
21
|
"@sap-ux/store": "1.0.0",
|
|
22
|
-
"@sap-ux/
|
|
23
|
-
"@sap-ux/btp-utils": "1.0.2",
|
|
22
|
+
"@sap-ux/btp-utils": "1.0.3",
|
|
24
23
|
"@sap-ux/ui5-config": "0.26.5",
|
|
24
|
+
"@sap-ux/project-access": "1.29.18",
|
|
25
25
|
"@sap-ux/logger": "0.6.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"memfs": "3.4.13",
|
|
30
30
|
"ts-jest": "29.1.2",
|
|
31
31
|
"ts-node": "10.9.2",
|
|
32
|
-
"typescript": "5.6.2",
|
|
33
32
|
"unionfs": "4.4.0",
|
|
34
33
|
"dotenv": "16.3.1"
|
|
35
34
|
},
|