@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.
Files changed (2) hide show
  1. package/README.md +16 -19
  2. 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 tracked metrics
3
+ Utils to work with common API metrics
4
4
 
5
5
  ## Installation
6
6
 
7
- 1. Authenticate to use GitHub registry as described in parent [README.md](../../../README.md).
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
- if (process.env.NODE_ENV === 'production') {
29
- collectStartupMetrics({
30
- prefix: METRICS_PREFIX,
31
- registry,
32
- defaultChain,
33
- supportedChains: supportedChains.split(','),
34
- version: process.env.npm_package_version ?? 'unversioned',
35
- commit: buildInfoJson.commit,
36
- branch: buildInfoJson.branch,
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](../rpc/README.md)
46
- and [@lidofinance/eth-api-providers](../../eth/api/providers/README.md), but you should use it if you use RPC requests
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": "Common api metrics",
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.2",
6
+ "version": "0.0.3",
7
7
  "files": [
8
8
  "dist"
9
9
  ],