@pager/minion-army 2.1.0 → 2.2.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [2.2.1](https://github.com/pagerinc/minion-army/compare/v2.2.0...v2.2.1) (2024-03-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ODIN-13:** patch version bump ([#459](https://github.com/pagerinc/minion-army/issues/459)) ([70a1bc2](https://github.com/pagerinc/minion-army/commit/70a1bc26df8bd77a4d7c675cfcb9a7bf0b171f91))
7
+
8
+ # [2.2.0](https://github.com/pagerinc/minion-army/compare/v2.1.0...v2.2.0) (2024-03-20)
9
+
10
+
11
+ ### Features
12
+
13
+ * **ODIN-13:** set NR transaction name based on worker name ([#458](https://github.com/pagerinc/minion-army/issues/458)) ([b0bb358](https://github.com/pagerinc/minion-army/commit/b0bb3583bcd9adfeb82653ce62e95a506d922a04))
14
+
1
15
  # [2.1.0](https://github.com/pagerinc/minion-army/compare/v2.0.0...v2.1.0) (2023-05-08)
2
16
 
3
17
 
package/cloudbuild.yaml CHANGED
@@ -33,7 +33,8 @@ tags:
33
33
  - 'npm'
34
34
  - 'nodejs'
35
35
 
36
- secrets:
37
- - kmsKeyName: projects/production-197117/locations/global/keyRings/gcb/cryptoKeys/main
38
- secretEnv:
39
- NPM_TOKEN: 'CiUA/4lqmXwRPPaGHe+X7TS7mwqARNCw5QFq7yfq7ESHaJrf+tzeElEADvOwrLQvnxCLG2wy+H2vD+DWHMosEgIfzpKNBJAVHX1u4FSwIF5utaN6tMIrLuZB18HnK2SKpsXTPvB/+0Eoz1acnj6WO+slz+GUGUnxefU='
36
+ availableSecrets:
37
+ secretManager:
38
+ - versionName: projects/145393225073/secrets/npm-token-publish/versions/latest
39
+ env: NPM_TOKEN
40
+
package/lib/index.js CHANGED
@@ -4,6 +4,7 @@ const Minion = require('@pager/minion');
4
4
  const { EventEmitter } = require('events');
5
5
  const Jackrabbit = require('@pager/jackrabbit');
6
6
  const Joi = require('joi');
7
+ const NewRelic = require('newrelic');
7
8
  const Schema = require('./schema');
8
9
 
9
10
  const validatorFactory = (handler, schema) => (payload, metadata) => { // eslint-disable-line
@@ -106,6 +107,8 @@ module.exports = (_manifest) => {
106
107
 
107
108
  const start = () => Object.values(minions).forEach((minion) => minion.start());
108
109
 
110
+ eventEmitter.on('message', (name, _message, _meta) => NewRelic.setTransactionName(name));
111
+
109
112
  return Object.assign(eventEmitter, {
110
113
  exchangeMap,
111
114
  minions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pager/minion-army",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "Microservice Framework for RabbitMQ Workers",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -38,7 +38,8 @@
38
38
  "semantic-release": "21.x"
39
39
  },
40
40
  "peerDependencies": {
41
- "joi": "^17.2.0"
41
+ "joi": "^17.2.0",
42
+ "newrelic": "11.x"
42
43
  },
43
44
  "renovate": {
44
45
  "extends": [