Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes telemetry PII-cleaning unintentionally redacting experimentation assignment context (e.g. when assignment strings contain substrings like key/token), which can break experimentation analysis and targeting.
Changes:
- Mark experiment/ABExp assignment context as “trusted” so it bypasses the generic secret redaction logic.
- Update Copilot telemetry plumbing to propagate trusted values through shared properties and sender APIs.
- Tighten internal-event sending behavior for Copilot’s MSFT telemetry sender.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/telemetry/common/telemetryService.ts | Wraps experiment properties in TelemetryTrustedValue so PII cleaning won’t redact ABExp context. |
| extensions/copilot/src/platform/telemetry/common/msftTelemetrySender.ts | Removes a redundant postEvent helper and ensures internal telemetry is gated on internal status. |
| extensions/copilot/src/platform/telemetry/common/baseTelemetryService.ts | Stores abexp.assignmentcontext as a trusted value and adjusts how experimentation events are forwarded to senders. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/platform/telemetry/common/telemetryService.ts:136
setExperimentPropertynow wraps all experiment properties inTelemetryTrustedValueto bypasscleanDataredaction. There are existing unit tests for TelemetryService but none that assert experiment properties containing substrings like "token"/"key" are preserved (the motivating regression in #308788). Please add a test (e.g. in src/vs/platform/telemetry/test/browser/telemetryService.test.ts) that sets an experiment property with such a value, logs an event, and verifies the appender receives the unredacted assignment context.
setExperimentProperty(name: string, value: string): void {
this._experimentProperties[name] = new TelemetryTrustedValue(value);
// On first call, flush all pending events that were buffered waiting for experiment properties
if (!this._isExperimentPropertySet) {
this._flushPendingEvents();
}
}
- Files reviewed: 3/3 changed files
- Comments generated: 1
extensions/copilot/src/platform/telemetry/common/baseTelemetryService.ts
Show resolved
Hide resolved
alexr00
approved these changes
Apr 9, 2026
joshspicer
pushed a commit
that referenced
this pull request
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #308788