@mts-pjsc/bretrics 1.0.0
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/LICENSE +21 -0
- package/README.md +92 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/IMetric.d.ts +4 -0
- package/dist/interfaces/IMetric.js +2 -0
- package/dist/interfaces/IMetric.js.map +1 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 MobileTeleSystems
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[](https://www.codacy.com/gh/LabEG/reca/dashboard?utm_source=github.com&utm_medium=referral&utm_content=LabEG/reca&utm_campaign=Badge_Grade)
|
|
2
|
+
[](https://www.npmjs.com/package/reca)
|
|
3
|
+
[](CODE_OF_CONDUCT.md)
|
|
4
|
+
[](https://github.com/LabEG/reca/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
# WebMon - Realtime user WebMonitoring
|
|
7
|
+
|
|
8
|
+
Monitor the performance of the user's browser and code for real users. Allows you to collect WebVitals metrics, performance and business metrics through the Prometheuse monitoring system.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **WebVitals** - allows you to collect the main performance metrics of the [WebVitals initiative](https://web.dev/vitals/),
|
|
13
|
+
- **Custom Metrics** - allows you to collect the [custom performance metrics](https://web.dev/custom-metrics/),
|
|
14
|
+
- **Business Metrics** - allows you to collect any business metrics and sales funnels,
|
|
15
|
+
- **Network Metrics** - allows you to evaluate the quality of the connection from clients to your servers,
|
|
16
|
+
- **Leaks Detection** - allows you to detect leaks in DOM elements, listeners, js and others.
|
|
17
|
+
|
|
18
|
+
## Instalation
|
|
19
|
+
|
|
20
|
+
npm:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @mts-pjsc/bretrics
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
yarn
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yarn add @mts-pjsc/bretrics
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
### Example Default Monitoring
|
|
35
|
+
|
|
36
|
+
The package has a pre-configured monitoring mode that includes the necessary webvitals metrics.
|
|
37
|
+
|
|
38
|
+
``` typescript
|
|
39
|
+
import {webmon} from "@mts-pjsc/bretrics";
|
|
40
|
+
|
|
41
|
+
webmon
|
|
42
|
+
.setup({apiPath: "/webmon"}) // <-- microservice deploy location
|
|
43
|
+
.useDefaultMonitoring()
|
|
44
|
+
.sendMetrics({my_metric: 5}); // <-- custom metrics
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If you need to send custom metric, you must use the `sendMetrics` method.
|
|
48
|
+
|
|
49
|
+
### Example Metrics with labels
|
|
50
|
+
|
|
51
|
+
Prometheus labels can be set as default for all metrics, or individually for each value.
|
|
52
|
+
|
|
53
|
+
``` typescript
|
|
54
|
+
import {webmon} from "@mts-pjsc/bretrics";
|
|
55
|
+
|
|
56
|
+
webmon
|
|
57
|
+
.setup({apiPath: "/webmon"})
|
|
58
|
+
.useDefaultMonitoring()
|
|
59
|
+
.setLabels({stage: "beta", path: location.pathname})
|
|
60
|
+
.sendMetrics({
|
|
61
|
+
my_metric: {
|
|
62
|
+
value: 5,
|
|
63
|
+
labels: {path: "/blog"}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The default labels will be added to the metrics if you didn't pass them in the `sendMetrics` method.
|
|
69
|
+
|
|
70
|
+
### Example WebMonitoring customization
|
|
71
|
+
|
|
72
|
+
The library exports the web monitoring constructor class, so you can inherit from it and implement logic according to OOP principles.
|
|
73
|
+
|
|
74
|
+
``` typescript
|
|
75
|
+
import {WebMonitoring} from "@mts-pjsc/bretrics";
|
|
76
|
+
|
|
77
|
+
export class WebMonitoringService extends WebMonitoring {
|
|
78
|
+
|
|
79
|
+
public override sendMetrics (metric: Record<string, number>): this {
|
|
80
|
+
super.sendMetrics(metric);
|
|
81
|
+
|
|
82
|
+
// ... your code here ...
|
|
83
|
+
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
WebMon is [MIT licensed](https://github.com/LabEG/reca/blob/main/LICENSE).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Metric } from "web-vitals";
|
|
2
|
+
import type { IMetric } from "./interfaces/IMetric";
|
|
3
|
+
export declare class WebMonitoring {
|
|
4
|
+
apiPath: string;
|
|
5
|
+
labels: Record<string, number | string>;
|
|
6
|
+
sendWebVitalsMetrics(): this;
|
|
7
|
+
setup(config: Partial<this>): this;
|
|
8
|
+
sendMetrics(metric: Record<string, number>): this;
|
|
9
|
+
useDefaultMonitoring(): this;
|
|
10
|
+
useDefaultLabels(): this;
|
|
11
|
+
setLabels(labels: Record<string, number | string>): this;
|
|
12
|
+
protected sendWebVitals(webVitalsMetric: Metric): void;
|
|
13
|
+
protected sendToMicroservice(metrics: Record<string, IMetric | number>): void;
|
|
14
|
+
protected prepareData(metrics: Record<string, IMetric | number>): Record<string, IMetric | number>;
|
|
15
|
+
protected getDeviceType(): string;
|
|
16
|
+
}
|
|
17
|
+
export declare const webmonitoring: WebMonitoring;
|
|
18
|
+
export declare const webmon: WebMonitoring;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { onLCP, onFID, onCLS, onFCP, onINP, onTTFB } from "web-vitals";
|
|
2
|
+
export class WebMonitoring {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.apiPath = "/webmon";
|
|
5
|
+
this.labels = {};
|
|
6
|
+
}
|
|
7
|
+
sendWebVitalsMetrics() {
|
|
8
|
+
onLCP((metric) => this.sendWebVitals(metric));
|
|
9
|
+
onFID((metric) => this.sendWebVitals(metric));
|
|
10
|
+
onCLS((metric) => this.sendWebVitals(metric));
|
|
11
|
+
onFCP((metric) => this.sendWebVitals(metric));
|
|
12
|
+
onINP((metric) => this.sendWebVitals(metric));
|
|
13
|
+
onTTFB((metric) => this.sendWebVitals(metric));
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
setup(config) {
|
|
17
|
+
this.apiPath = config.apiPath ?? this.apiPath;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
sendMetrics(metric) {
|
|
21
|
+
this.sendToMicroservice(metric);
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
useDefaultMonitoring() {
|
|
25
|
+
this.useDefaultLabels();
|
|
26
|
+
this.sendWebVitalsMetrics();
|
|
27
|
+
Promise.resolve().then(() => {
|
|
28
|
+
this.sendMetrics({
|
|
29
|
+
// eslint-disable-next-line camelcase
|
|
30
|
+
elements_count: document.getElementsByTagName("*").length
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
useDefaultLabels() {
|
|
36
|
+
const defaultLabels = {
|
|
37
|
+
// eslint-disable-next-line camelcase
|
|
38
|
+
device_type: this.getDeviceType(),
|
|
39
|
+
path: decodeURIComponent(location.pathname) // Decode for human readable non latin chars
|
|
40
|
+
};
|
|
41
|
+
this.labels = {
|
|
42
|
+
...this.labels,
|
|
43
|
+
...defaultLabels
|
|
44
|
+
};
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
setLabels(labels) {
|
|
48
|
+
this.labels = {
|
|
49
|
+
...this.labels,
|
|
50
|
+
...labels
|
|
51
|
+
};
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
sendWebVitals(webVitalsMetric) {
|
|
55
|
+
const webmonMetrics = {};
|
|
56
|
+
Reflect.set(webmonMetrics, webVitalsMetric.name.toLowerCase(), webVitalsMetric.value);
|
|
57
|
+
this.sendToMicroservice(webmonMetrics);
|
|
58
|
+
}
|
|
59
|
+
// eslint-disable-next-line max-statements
|
|
60
|
+
sendToMicroservice(metrics) {
|
|
61
|
+
const path = `${this.apiPath}/send-metrics/metrics`;
|
|
62
|
+
const body = JSON.stringify(this.prepareData(metrics));
|
|
63
|
+
if (typeof navigator.sendBeacon === "function") {
|
|
64
|
+
navigator.sendBeacon(path, body);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
fetch(path, {
|
|
68
|
+
body,
|
|
69
|
+
method: "POST",
|
|
70
|
+
keepalive: true
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
prepareData(metrics) {
|
|
75
|
+
const sendMetrics = {};
|
|
76
|
+
const metricsNames = Reflect.ownKeys(metrics);
|
|
77
|
+
const labelsCount = Reflect.ownKeys(this.labels).length;
|
|
78
|
+
for (const metricsName of metricsNames) {
|
|
79
|
+
const metricValue = Reflect.get(metrics, metricsName);
|
|
80
|
+
if (typeof metricValue === "number" && labelsCount === 0) {
|
|
81
|
+
Reflect.set(sendMetrics, metricsName, metricValue);
|
|
82
|
+
}
|
|
83
|
+
else if (typeof metricValue === "number") {
|
|
84
|
+
Reflect.set(sendMetrics, metricsName, {
|
|
85
|
+
value: metricValue,
|
|
86
|
+
labels: this.labels
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
Reflect.set(sendMetrics, metricsName, {
|
|
91
|
+
value: metricValue.value,
|
|
92
|
+
labels: {
|
|
93
|
+
...this.labels,
|
|
94
|
+
...metricValue.labels
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return sendMetrics;
|
|
100
|
+
}
|
|
101
|
+
getDeviceType() {
|
|
102
|
+
const ua = navigator.userAgent;
|
|
103
|
+
if ((/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/iu).test(ua)) {
|
|
104
|
+
return "tablet";
|
|
105
|
+
}
|
|
106
|
+
if ((/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/u).test(ua)) {
|
|
107
|
+
return "mobile";
|
|
108
|
+
}
|
|
109
|
+
return "desktop";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export const webmonitoring = new WebMonitoring();
|
|
113
|
+
export const webmon = webmonitoring;
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAA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G,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EACnH;YACE,OAAO,QAAQ,CAAC;SACnB;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;CAEJ;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMetric.js","sourceRoot":"","sources":["../../src/interfaces/IMetric.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mts-pjsc/bretrics",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Web Monitoring",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/MobileTeleSystems/bretrics-web.git"
|
|
10
|
+
},
|
|
11
|
+
"author": "MobileTeleSystems",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "npm run clean && tsc && npm run clean:dist-tests && npm run test:module",
|
|
15
|
+
"clean": "rimraf ./dist",
|
|
16
|
+
"cs:eslint": "eslint --fix -c .eslintrc.cjs --ext .tsx,.ts,.jsx,.js ./src/",
|
|
17
|
+
"clean:dist-tests": "rimraf ./dist/__fixtures__ && rimraf ./dist/__tests__",
|
|
18
|
+
"test": "mocha --parallel src/__tests__/*.spec.tsx",
|
|
19
|
+
"test:watch": "mocha --parallel --watch --watch-files src/**/*.ts,src/**/*.tsx src/__tests__/*.spec.tsx",
|
|
20
|
+
"test:module": "node ./dist/index.js",
|
|
21
|
+
"release": "standard-version",
|
|
22
|
+
"prepublishOnly": "npm run test && npm run build",
|
|
23
|
+
"prepare": "husky install"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"metrics",
|
|
27
|
+
"prometheus"
|
|
28
|
+
],
|
|
29
|
+
"lint-staged": {
|
|
30
|
+
"./src/**/*.(ts|tsx|js|jsx)": [
|
|
31
|
+
"eslint --fix -c .eslintrc.cjs --ext .tsx,.ts,.jsx,.js"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"web-vitals": "^3.1.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@commitlint/cli": "^17.3.0",
|
|
39
|
+
"@commitlint/config-conventional": "^17.3.0",
|
|
40
|
+
"@labeg/code-style": "^2.0.63",
|
|
41
|
+
"@types/chai": "^4.3.4",
|
|
42
|
+
"@types/mocha": "^10.0.1",
|
|
43
|
+
"chai": "^4.3.7",
|
|
44
|
+
"global-jsdom": "^8.6.0",
|
|
45
|
+
"husky": "^8.0.2",
|
|
46
|
+
"jsdom": "^20.0.3",
|
|
47
|
+
"lint-staged": "^13.1.0",
|
|
48
|
+
"mocha": "^10.1.0",
|
|
49
|
+
"rimraf": "^3.0.2",
|
|
50
|
+
"standard-version": "^9.5.0",
|
|
51
|
+
"typescript": "^4.9.4"
|
|
52
|
+
}
|
|
53
|
+
}
|