Skip to content

Commit

Permalink
Call reply hook before span.finish()
Browse files Browse the repository at this point in the history
  • Loading branch information
dwinrick-lever committed Jul 27, 2021
1 parent f7fd77f commit 8ee40a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/datadog-plugin-sharedb/src/index.js
Expand Up @@ -66,12 +66,12 @@ function wrapCallback (config, tracer, request, span, done) {
span.setTag('error', err)
}

span.finish()

if (config.hooks && config.hooks.reply) {
config.hooks.reply(span, request, res)
}

span.finish()

if (done) {
done(err, res)
}
Expand Down

0 comments on commit 8ee40a8

Please sign in to comment.