Skip to content

Commit ed7014b

Browse files
committed
fix: count occurrences by type+name
1 parent 07a35f7 commit ed7014b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/v3/ActiveTrace.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,9 @@ export class ActiveTrace<ScopeT extends ScopeBase> {
569569
// update the span in the recording
570570
spanAndAnnotation.span = span
571571
} else {
572-
const occurrence = this.occurrenceCounters.get(span.name) ?? 1
573-
this.occurrenceCounters.set(span.name, occurrence + 1)
572+
const spanId = `${span.type}:${span.name}`
573+
const occurrence = this.occurrenceCounters.get(spanId) ?? 1
574+
this.occurrenceCounters.set(spanId, occurrence + 1)
574575

575576
const annotation: SpanAnnotation = {
576577
id: this.input.id,

0 commit comments

Comments
 (0)