We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2783499 commit 06b1152Copy full SHA for 06b1152
src/service/tracing/tracingMiddlewares.ts
@@ -151,7 +151,10 @@ export const traceUserLandRemainingPipelineMiddleware = () => {
151
}
152
153
function shouldTrace(ctx: ServiceContext, rootSpan: SpanContext | undefined) {
154
- // Should trace if path isnt blacklisted and tracing decision came from the edge
+ /** Should trace if path isnt blacklisted and sampling decision came from the edge
155
+ * ((rootSpan as any).isSampled. returns whether or not this span context was sampled
156
+ * There is a cast to bypass opentracing typescript
157
+ */
158
return !PATHS_BLACKLISTED_FOR_TRACING.includes(ctx.request.path) && ((rootSpan as any).isSampled?.() ?? false)
159
160
0 commit comments