Skip to content

Commit

Permalink
fix error in http2 plugin when instrumented mid-request (#3488)
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev committed Jul 31, 2023
1 parent ed426eb commit aafa9d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/datadog-instrumentations/src/http2/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function createWrapEmit (ctx) {
function createWrapRequest (authority, options) {
return function wrapRequest (request) {
return function (headers) {
if (!startChannel.hasSubscribers) return request.apply(this, arguments)

const ctx = { headers, authority, options }

return startChannel.runStores(ctx, () => {
Expand Down

0 comments on commit aafa9d6

Please sign in to comment.