Skip to content

Commit

Permalink
Clarify setting activeSpan with a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Feb 5, 2021
1 parent 69cff93 commit 96a5ac9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions x-pack/plugins/apm/server/utils/with_span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function withSpan<T>(
const resource = new asyncHooks.AsyncResource('fake_async');

return resource.runInAsyncScope(() => {
// set the active span for the newly created async context
// @ts-ignore
agent._instrumentation.activeSpan = span;
if (type) {
Expand Down

0 comments on commit 96a5ac9

Please sign in to comment.