Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/platform/telemetry/common/msftTelemetrySender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ export class BaseMsftTelemetrySender implements IMSFTTelemetrySender {
private processToken(token: CopilotToken | undefined) {
this._username = token?.username;
this._vscodeTeamMember = !!token?.isVscodeTeamMember;
this._tid = token?.getTokenValue('tid');
// Only update tid if we have a new valid value - preserve last known tid for error telemetry where token may be undefined
const newTid = token?.getTokenValue('tid');
if (newTid) {
this._tid = newTid;
}
Comment on lines +117 to +121
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preservation of tid creates an asymmetry with how username and sku are handled when the token becomes undefined. Consider documenting why tid requires different treatment compared to other token-derived fields. This will help future maintainers understand that tid serves as a session correlation identifier that should persist across temporary token unavailability, while username and sku represent current state that can be cleared.

Copilot uses AI. Check for mistakes.
this._sku = token?.sku;
this._isInternal = !!token?.isInternal;

Expand Down
Loading