@emartech/aggregate-metric-logger 6.0.3 → 6.1.1

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.
@@ -13,14 +13,14 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
15
  - name: Check out repository
16
- uses: actions/checkout@v5
16
+ uses: actions/checkout@v6
17
17
  - name: Use correct Node version
18
18
  uses: actions/setup-node@v6
19
19
  with:
20
20
  node-version-file: '.nvmrc'
21
21
  - name: Cache node_modules
22
22
  id: cache_node_modules
23
- uses: actions/cache@v4
23
+ uses: actions/cache@v5
24
24
  with:
25
25
  path: node_modules
26
26
  key: node_modules-${{ hashFiles('**/package-lock.json') }}
@@ -48,14 +48,14 @@ jobs:
48
48
  runs-on: ubuntu-latest
49
49
  steps:
50
50
  - name: Check out repository
51
- uses: actions/checkout@v5
51
+ uses: actions/checkout@v6
52
52
  - name: Use correct Node version
53
53
  uses: actions/setup-node@v6
54
54
  with:
55
55
  node-version-file: '.nvmrc'
56
56
  - name: Cache node_modules
57
57
  id: cache_node_modules
58
- uses: actions/cache@v4
58
+ uses: actions/cache@v5
59
59
  with:
60
60
  path: node_modules
61
61
  key: node_modules-${{ hashFiles('**/package-lock.json') }}
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 22.20.0
1
+ 24.16.0
package/README.md CHANGED
@@ -12,7 +12,7 @@ set, but for a pod running on kubernetes this should already be set.
12
12
 
13
13
  Add `Monitoring Metrics Writer` Role to the service account in the GCP project.
14
14
 
15
- ## Usage
15
+ ## Usage
16
16
 
17
17
  ### Count occurrences
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emartech/aggregate-metric-logger",
3
- "version": "6.0.3",
3
+ "version": "6.1.1",
4
4
  "description": "aggregate metrics in memory for logging",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -31,17 +31,17 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@emartech/json-logger": "^9.0.0",
34
- "@google-cloud/monitoring": "^4.1.0",
34
+ "@google-cloud/monitoring": "^5.0.0",
35
35
  "json-stable-stringify": "^1.1.1",
36
36
  "lodash": "^4.17.15",
37
37
  "ms": "^2.1.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@emartech/rti-server-tools": "^9.0.0",
40
+ "@emartech/rti-server-tools": "^10.0.0",
41
41
  "@types/jest": "^30.0.0",
42
42
  "dotenv-haphap": "^3.1.2",
43
- "eslint": "^9.7.0",
44
- "globals": "16.4.0",
43
+ "eslint": "^10.0.0",
44
+ "globals": "17.6.0",
45
45
  "jest": "^30.0.0",
46
46
  "semantic-release": "^25.0.0"
47
47
  }
@@ -18,8 +18,13 @@ class GcpTimeSeriesPublisher {
18
18
 
19
19
  async publishTimeSeries(timeSeries) {
20
20
  try {
21
+ const timeSeriesChunks = chunk(timeSeries, MAX_TIME_SERIES_COUNT);
22
+ logger.info('timeseries-count', {
23
+ count: timeSeries.length,
24
+ limit: timeSeriesChunks.length
25
+ });
21
26
  const client = this.getMonitoringClient();
22
- for (const timeSeriesChunk of chunk(timeSeries, MAX_TIME_SERIES_COUNT)) {
27
+ for (const timeSeriesChunk of timeSeriesChunks) {
23
28
  await this.createTimeSeries(client, timeSeriesChunk);
24
29
  }
25
30
  } catch (error) {