diff --git a/index.js b/index.js index 274fcb5..805a4be 100644 --- a/index.js +++ b/index.js @@ -72,7 +72,7 @@ function jaegerPlugin (fastify, opts, next) { function onResponse (req, reply, done) { const span = tracerMap.get(req) - span.setTag(Tags.HTTP_STATUS_CODE, reply.raw.statusCode) + span.setTag(Tags.HTTP_STATUS_CODE, reply.res.statusCode) span.finish() done() }