Skip to content

Commit

Permalink
fix: delete root span from ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
DinaYakovlev committed Feb 1, 2021
1 parent 6b90688 commit 61af54c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/node/opentelemetry-koa-instrumentation/src/koa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ export class KoaInstrumentation extends BasePlugin<typeof koa> {
context.request.ctx.parentSpan.updateName(
`${context.method} ${context._matchedRoute}`
);

delete context.request.ctx.parentSpan;
}
}
}
Expand Down

0 comments on commit 61af54c

Please sign in to comment.