Skip to content

Commit

Permalink
0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicporteous committed Jul 5, 2021
1 parent ed900b4 commit 9b36f2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serve",
"version": "0.8.0",
"version": "0.8.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
9 changes: 9 additions & 0 deletions src/tracing/tracing.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ const tracingMiddleware = (opts) => {
if (ctx.requestId) {

const span = getCurrentSpan()

if (!span) {

ctx.logger.debug('No captured trace for request')

return next()

}

const { traceId } = span.spanContext()

span.setAttribute('request.date', new Date())
Expand Down

0 comments on commit 9b36f2f

Please sign in to comment.