nats-hemera
Advanced tools
Comparing version 3.5.0 to 3.5.1
@@ -22,3 +22,3 @@ 'use strict' | ||
], | ||
// NATS erros | ||
// NATS errors | ||
NATS_TRANSPORT_ERROR: 'Could not connect to NATS!', | ||
@@ -25,0 +25,0 @@ NATS_TRANSPORT_CLOSED: 'NATS connection closed!', |
@@ -38,8 +38,17 @@ 'use strict' | ||
// tracing | ||
context.trace$ = pattern.trace$ || {} | ||
context.trace$.parentSpanId = | ||
context.trace$.spanId || parentContext.trace$.spanId | ||
context.trace$.traceId = | ||
context.trace$.traceId || parentContext.trace$.traceId || Util.randomId() | ||
context.trace$.spanId = Util.randomId() | ||
if (pattern.trace$) { | ||
context.trace$ = { | ||
spanId: pattern.trace$.spanId || Util.randomId(), | ||
traceId: pattern.trace$.traceId || Util.randomId() | ||
} | ||
context.trace$.parentSpanId = | ||
pattern.trace$.parentSpanId || parentContext.trace$.spanId | ||
} else { | ||
context.trace$ = { | ||
spanId: parentContext.trace$.spanId || Util.randomId(), | ||
traceId: parentContext.trace$.traceId || Util.randomId() | ||
} | ||
context.trace$.parentSpanId = parentContext.trace$.spanId | ||
} | ||
context.trace$.timestamp = currentTime | ||
@@ -161,3 +170,3 @@ context.trace$.service = pattern.topic | ||
// icnoming pattern | ||
// incoming pattern | ||
context._pattern = context._request.payload.pattern | ||
@@ -164,0 +173,0 @@ // find matched action |
{ | ||
"name": "nats-hemera", | ||
"author": "Dustin Deus (https://github.com/StarpTech)", | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "homepage": "https://hemerajs.github.io/hemera/", |
75969
2945