Skip to content

Mixing manual spans with auto instrumentation (fetch) #2004

Answered by Flarna
alexvanboxel asked this question in Q&A
Discussion options

You must be logged in to vote

You have to create a new context holding your span and run the fetch code with this context set as active.

see e.g.

const singleSpan = webTracerWithZone.startSpan(`files-series-info`);
context.with(setSpan(context.active(), singleSpan), () => {

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alexvanboxel
Comment options

@carlosnat
Comment options

Answer selected by dyladan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants