Skip to content

Commit de72775

Browse files
Autocomplete: Log if a completion was suggested again (#3136)
Add a span event when a completion was already logged as suggested. Mainly to ensure we have attributes attached. Noticed a few spans with source `null` in Honeycomb. ## Test plan - Ensured that this is the codepath taken via adding debugger breakpoints.
1 parent 4c0f68d commit de72775

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vscode/src/completions/logger.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,9 @@ export function suggested(id: CompletionLogID, span?: Span): void {
540540
event.suggestionAnalyticsLoggedAt = performance.now()
541541
}
542542
}, READ_TIMEOUT_MS)
543+
} else {
544+
span?.setAttributes(getSharedParams(event) as any)
545+
span?.addEvent('suggested-again')
543546
}
544547
}
545548

0 commit comments

Comments
 (0)