@autofleet/rabbit 2.5.0-beta.1 → 2.5.0-beta.2

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,12 +125,13 @@ class RabbitMq {
125
125
  }
126
126
  }
127
127
  static getPublishOptions(customHeaders = {}) {
128
+ const trace = zehut_1.getCurrentPayload();
128
129
  return {
129
130
  timestamp: moment_1.default().unix(),
130
131
  headers: {
131
132
  creationTimestamp: moment_1.default().valueOf(),
132
133
  ...customHeaders,
133
- [TRACING_HEADER]: zehut_1.getCurrentPayload()?.get?.(TRACING_HEADER),
134
+ [TRACING_HEADER]: trace?.context?.get(TRACING_HEADER),
134
135
  },
135
136
  };
136
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/rabbit",
3
- "version": "2.5.0-beta.1",
3
+ "version": "2.5.0-beta.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -105,12 +105,13 @@ class RabbitMq implements IAfRabbitMq {
105
105
  }
106
106
 
107
107
  static getPublishOptions(customHeaders: CustomMessageHeaders = {}) {
108
+ const trace = getCurrentPayload();
108
109
  return {
109
110
  timestamp: moment().unix(),
110
111
  headers: {
111
112
  creationTimestamp: moment().valueOf(),
112
113
  ...customHeaders,
113
- [TRACING_HEADER]: getCurrentPayload()?.get?.(TRACING_HEADER),
114
+ [TRACING_HEADER]: trace?.context?.get(TRACING_HEADER),
114
115
  },
115
116
  };
116
117
  }