@lidofinance/api-metrics 0.0.2 → 0.0.3
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/README.md +16 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# @lidofinance/api-metrics
|
|
2
2
|
|
|
3
|
-
Utils to work with common
|
|
3
|
+
Utils to work with common API metrics
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. `yarn add @lidofinance/api-metrics`.
|
|
7
|
+
`yarn add @lidofinance/api-metrics`
|
|
9
8
|
|
|
10
9
|
## Getting started
|
|
11
10
|
|
|
@@ -25,26 +24,24 @@ const { defaultChain, supportedChains } = publicRuntimeConfig;
|
|
|
25
24
|
|
|
26
25
|
export const registry = new Registry();
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
collectDefaultMetrics({ prefix: METRICS_PREFIX, register: registry });
|
|
40
|
-
}
|
|
27
|
+
collectStartupMetrics({
|
|
28
|
+
prefix: METRICS_PREFIX,
|
|
29
|
+
registry,
|
|
30
|
+
defaultChain,
|
|
31
|
+
supportedChains: supportedChains.split(','),
|
|
32
|
+
version: process.env.npm_package_version ?? 'unversioned',
|
|
33
|
+
commit: buildInfoJson.commit,
|
|
34
|
+
branch: buildInfoJson.branch,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
collectDefaultMetrics({ prefix: METRICS_PREFIX, register: registry });
|
|
41
38
|
```
|
|
42
39
|
|
|
43
40
|
### rpcMetricsFactory
|
|
44
41
|
|
|
45
|
-
It's mostly internal util for [@lidofinance/api-rpc](
|
|
46
|
-
and [@lidofinance/eth-api-providers](
|
|
47
|
-
in some other way.
|
|
42
|
+
It's mostly internal util for [@lidofinance/api-rpc](https://www.npmjs.com/package/@lidofinance/api-rpc)
|
|
43
|
+
and [@lidofinance/eth-api-providers](https://www.npmjs.com/package/@lidofinance/eth-api-providers), but you should use
|
|
44
|
+
it if you use RPC requests in some other way.
|
|
48
45
|
|
|
49
46
|
Take a look into the file itself to view exported metrics, it's quite simple.
|
|
50
47
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lidofinance/api-metrics",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "Utils to work with common API metrics",
|
|
4
4
|
"repository": "git@github.com:lidofinance/lido-ui-blocks.git",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.3",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|