Skip to content

Commit

Permalink
TracingMiddleare rootSpan null checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeymisson committed Aug 30, 2023
1 parent 928ceb1 commit a2ab034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service/tracing/tracingMiddlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ export const traceUserLandRemainingPipelineMiddleware = () => {
}
function shouldTrace(ctx: ServiceContext, rootSpan: SpanContext | undefined) {
// Should trace if path isnt blacklisted and tracing decision came from the edge
return !PATHS_BLACKLISTED_FOR_TRACING.includes(ctx.request.path) && rootSpan
return !PATHS_BLACKLISTED_FOR_TRACING.includes(ctx.request.path) && rootSpan != null
}

0 comments on commit a2ab034

Please sign in to comment.