diff --git a/package.json b/package.json index 473bc88..4572363 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serve", - "version": "0.7.7", + "version": "0.7.8", "description": "", "main": "index.js", "scripts": { diff --git a/src/tracing/tracing.js b/src/tracing/tracing.js index f3ed45c..c81e7fe 100644 --- a/src/tracing/tracing.js +++ b/src/tracing/tracing.js @@ -53,9 +53,13 @@ const tracingMiddleware = (opts) => { if (ctx.requestId) { const span = getCurrentSpan() + const { traceId } = span.spanContext() - span.setAttribute('Date', new Date()) - span.setAttribute('RequestID', ctx.requestId) + span.setAttribute('request.date', new Date()) + span.setAttribute('request.requestId', ctx.requestId) + span.setAttribute('request.traceId', traceId) + + ctx.logger.debug('Captured trace for request', { traceId }) }