Skip to content

Commit

Permalink
clean up types
Browse files Browse the repository at this point in the history
  • Loading branch information
evanderkoogh committed Sep 18, 2024
1 parent 8f29760 commit 84fa5bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sampling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export function multiTailSampler(samplers: TailSampleFn[]): TailSampleFn {
}

export const isHeadSampled: TailSampleFn = (traceInfo) => {
const localRootSpan = traceInfo.localRootSpan as unknown as ReadableSpan
const localRootSpan = traceInfo.localRootSpan
return (localRootSpan.spanContext().traceFlags & TraceFlags.SAMPLED) === TraceFlags.SAMPLED
}

export const isRootErrorSpan: TailSampleFn = (traceInfo) => {
const localRootSpan = traceInfo.localRootSpan as unknown as ReadableSpan
const localRootSpan = traceInfo.localRootSpan
return localRootSpan.status.code === SpanStatusCode.ERROR
}

0 comments on commit 84fa5bc

Please sign in to comment.