moleculer-web
Advanced tools
Comparing version 0.10.0-beta2 to 0.10.0-beta3
@@ -104,5 +104,5 @@ <a name="0.10.0"></a> | ||
rootCallOptions: { | ||
timeout: 500 | ||
} | ||
rootCallOptions: { | ||
timeout: 500 | ||
} | ||
} | ||
@@ -121,29 +121,29 @@ }; | ||
rootCallOptions(options, req, res) { | ||
if (req.headers["traceparent"]) { | ||
// More info https://www.w3.org/TR/trace-context/#traceparent-header | ||
const traceparent = req.headers["traceparent"].toLowerCase(); | ||
if (traceparent.match(/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/)) { | ||
const [version, id, parentSpan, flags] = traceparent.split("-"); | ||
const sampled = (flags & FLAG_SAMPLED) == FLAG_SAMPLED; | ||
rootCallOptions(options, req, res) { | ||
if (req.headers["traceparent"]) { | ||
// More info https://www.w3.org/TR/trace-context/#traceparent-header | ||
const traceparent = req.headers["traceparent"].toLowerCase(); | ||
if (traceparent.match(/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/)) { | ||
const [version, id, parentSpan, flags] = traceparent.split("-"); | ||
const sampled = (flags & FLAG_SAMPLED) == FLAG_SAMPLED; | ||
options.parentSpan = { | ||
id: parentSpan, | ||
traceID: id, | ||
sampled | ||
}; | ||
} | ||
} else { | ||
// Look for X-B3-Traceid, X-B3-Spanid | ||
options.parentSpan = {}; | ||
options.parentSpan = { | ||
id: parentSpan, | ||
traceID: id, | ||
sampled | ||
}; | ||
} | ||
} else { | ||
// Look for X-B3-Traceid, X-B3-Spanid | ||
options.parentSpan = {}; | ||
if (req.headers["x-b3-traceid"]) { | ||
options.parentSpan.traceID = req.headers["x-b3-traceid"].toLowerCase(); | ||
options.parentSpan.sampled = true; | ||
} | ||
if (req.headers["x-b3-spanid"]) { | ||
options.parentSpan.id = req.headers["x-b3-spanid"].toLowerCase(); | ||
} | ||
} | ||
} | ||
if (req.headers["x-b3-traceid"]) { | ||
options.parentSpan.traceID = req.headers["x-b3-traceid"].toLowerCase(); | ||
options.parentSpan.sampled = true; | ||
} | ||
if (req.headers["x-b3-spanid"]) { | ||
options.parentSpan.id = req.headers["x-b3-spanid"].toLowerCase(); | ||
} | ||
} | ||
} | ||
} | ||
@@ -161,11 +161,11 @@ }; | ||
settings: { | ||
rest: ["/posts", "/v1/posts"] | ||
}, | ||
rest: ["/posts", "/v1/posts"] | ||
}, | ||
actions: { | ||
find: { | ||
rest: ["GET /", "GET /all"] | ||
handler(ctx) {} | ||
} | ||
} | ||
actions: { | ||
find: { | ||
rest: ["GET /", "GET /all"] | ||
handler(ctx) {} | ||
} | ||
} | ||
}; | ||
@@ -172,0 +172,0 @@ ``` |
{ | ||
"name": "moleculer-web", | ||
"version": "0.10.0-beta2", | ||
"version": "0.10.0-beta3", | ||
"description": "Official API Gateway service for Moleculer framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
103321
0