@autofleet/rabbit 3.0.1-alpha4 → 3.0.1-alpha6

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 CHANGED
@@ -125,6 +125,11 @@ 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
+ context1: trace?.context?.get(consts_1.TRACING_HEADER),
131
+ context2: trace?.context?.get('userObject'),
132
+ });
128
133
  return {
129
134
  timestamp: moment_1.default().unix(),
130
135
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/rabbit",
3
- "version": "3.0.1-alpha4",
3
+ "version": "3.0.1-alpha6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
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 as getCurrentContext, newTrace, traceTypes } from '@autofleet/zehut';
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,12 @@ class RabbitMq implements IAfRabbitMq {
108
108
  }
109
109
 
110
110
  static getPublishOptions(customHeaders: CustomMessageHeaders = {}) {
111
- const trace = getCurrentContext();
111
+ const trace = getCurrentPayload();
112
+ logger.info('getPublishOptions', {
113
+ trace,
114
+ context1: trace?.context?.get(TRACING_HEADER),
115
+ context2: trace?.context?.get('userObject'),
116
+ });
112
117
  return {
113
118
  timestamp: moment().unix(),
114
119
  headers: {