@autofleet/rabbit 3.0.1-alpha3 → 3.0.1-alpha5
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/dist/index.js +3 -0
- package/package.json +1 -4
- package/src/index.ts +5 -2
package/dist/index.js
CHANGED
|
@@ -125,6 +125,9 @@ class RabbitMq {
|
|
|
125
125
|
}
|
|
126
126
|
static getPublishOptions(customHeaders = {}) {
|
|
127
127
|
const trace = zehut_1.getCurrentPayload();
|
|
128
|
+
logger_1.default.info('getPublishOptions', {
|
|
129
|
+
trace,
|
|
130
|
+
});
|
|
128
131
|
return {
|
|
129
132
|
timestamp: moment_1.default().unix(),
|
|
130
133
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/rabbit",
|
|
3
|
-
"version": "3.0.1-
|
|
3
|
+
"version": "3.0.1-alpha5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
"redis-lock": "^0.1.4",
|
|
28
28
|
"uuid": "^8.3.2"
|
|
29
29
|
},
|
|
30
|
-
"peerDependencies": {
|
|
31
|
-
"@autofleet/outbreak": "^0.2.1"
|
|
32
|
-
},
|
|
33
30
|
"devDependencies": {
|
|
34
31
|
"@types/jest": "^26.0.23",
|
|
35
32
|
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { AmqpConnectionManager, ChannelWrapper, connect } from 'amqp-connection-
|
|
|
8
8
|
import {
|
|
9
9
|
ConfirmChannel, ConsumeMessage, Options, Replies,
|
|
10
10
|
} from 'amqplib';
|
|
11
|
-
import { getCurrentPayload
|
|
11
|
+
import { getCurrentPayload, newTrace, traceTypes } from '@autofleet/zehut';
|
|
12
12
|
import logger from './logger';
|
|
13
13
|
import RabbitError from './lib/rabbitError';
|
|
14
14
|
import getRedisInstance, { RedisConfig } from './lib/redis';
|
|
@@ -108,7 +108,10 @@ class RabbitMq implements IAfRabbitMq {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
static getPublishOptions(customHeaders: CustomMessageHeaders = {}) {
|
|
111
|
-
const trace =
|
|
111
|
+
const trace = getCurrentPayload();
|
|
112
|
+
logger.info('getPublishOptions', {
|
|
113
|
+
trace,
|
|
114
|
+
});
|
|
112
115
|
return {
|
|
113
116
|
timestamp: moment().unix(),
|
|
114
117
|
headers: {
|