Skip to content

Add GDPR declaration for pyrefly.detection telemetry event#26053

Merged
rchiodo merged 1 commit into
microsoft:mainfrom
rchiodo:rchiodo/pyrefly-detection-gdpr
Jul 22, 2026
Merged

Add GDPR declaration for pyrefly.detection telemetry event#26053
rchiodo merged 1 commit into
microsoft:mainfrom
rchiodo:rchiodo/pyrefly-detection-gdpr

Conversation

@rchiodo

@rchiodo rchiodo commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Adds a __GDPR__ declaration for the Pylance pyrefly.detection telemetry event so it is allow-listed and reaches the telemetry pipeline.

Background

Pylance emits a PYREFLY.DETECTION event (sent through the ms-python.python reporter as ms-python.python/pyrefly.detection) during background Pyrefly detection, to measure the addressable audience that could be offered a switch to Pyrefly. The event shipped in Pylance 2026.2.109 (pre-release) and 2026.3.1 (stable) and fires unconditionally on the same reporter as language_server.ready.

Despite millions of users on those builds emitting the sibling language_server.ready event, pyrefly.detection showed zero rows in telemetry. Root cause: the new event name was not declared in this GDPR allow-list, so it was scrubbed before ingestion. language_server.ready is declared here and flows fine; pyrefly.detection was missing.

Change

Declares pyrefly.detection with its properties:

  • available, haspyreflytoml, haspyprojectsection, hasenvironmentbinary, promptdismissed, notificationenabled — the event-specific fields emitted by Pylance's _reportDetectionTelemetry.
  • lsversion, failed — common properties, mirroring the sibling language_server.ready declaration.

All properties are SystemMetaData / non-personal (booleans and the LS version).

Impact

No runtime code change. Once a Python extension build containing this declaration reaches users, data will begin flowing from already-deployed Pylance clients that are already emitting the event.

The vscode-pylance PYREFLY.DETECTION event (sent as ms-python.python/pyrefly.detection)
was shipping in Pylance 2026.2.109 / 2026.3.1 and firing on the same reporter as
language_server.ready, but showed zero data in telemetry because the event name was not
declared in this GDPR allow-list and was therefore scrubbed before ingestion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a93b6348-9ac6-4951-8998-8d607333b267
@rchiodo rchiodo added the debt Code quality issues label Jul 22, 2026
@rchiodo
rchiodo enabled auto-merge (squash) July 22, 2026 21:51
@rchiodo rchiodo added skip tests Updates to tests unnecessary skip-issue-check labels Jul 22, 2026
"failed" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do the gdpr items not need to be on the python extension side anymore? I have the impression that we always added there.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

my bad, just realized it's the python extension

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

THey're on both apparently. I wish we could move them to just inside of PYlance

@rchiodo
rchiodo merged commit 61c0139 into microsoft:main Jul 22, 2026
54 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues skip tests Updates to tests unnecessary skip-issue-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants