@autofleet/rabbit 2.5.0 → 2.5.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/dist/index.js +4 -2
- package/package.json +1 -1
- package/src/index.ts +4 -2
package/dist/index.js
CHANGED
|
@@ -256,8 +256,10 @@ class RabbitMq {
|
|
|
256
256
|
return null;
|
|
257
257
|
}
|
|
258
258
|
const traceId = msg.properties.headers[TRACING_HEADER];
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
if (traceId) {
|
|
260
|
+
const trace = outbreak_1.newTrace(outbreak_1.traceTypes.RABBIT);
|
|
261
|
+
trace?.context?.set(TRACING_HEADER, traceId);
|
|
262
|
+
}
|
|
261
263
|
const parsedMessage = RabbitMq.parseMsg(msg);
|
|
262
264
|
const releaseLock = await this.lockRedisIfNeeded(parsedMessage, optionsWithDefaults);
|
|
263
265
|
const shouldConsume = await this.shouldConsumeMessageByTimestamp(parsedMessage);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -364,8 +364,10 @@ class RabbitMq implements IAfRabbitMq {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
const traceId = msg.properties.headers[TRACING_HEADER];
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
if (traceId) {
|
|
368
|
+
const trace = newTrace(traceTypes.RABBIT);
|
|
369
|
+
(trace as any)?.context?.set(TRACING_HEADER, traceId);
|
|
370
|
+
}
|
|
369
371
|
|
|
370
372
|
const parsedMessage = RabbitMq.parseMsg(msg);
|
|
371
373
|
const releaseLock = await this.lockRedisIfNeeded(parsedMessage, optionsWithDefaults);
|