Skip to content

chore: bump Uno.Settings.DevServer to 2.0.0-dev.10 and Uno.DevTools.Telemetry to 1.4.0-dev.18 - #24594

Merged
MartinZikmund merged 3 commits into
masterfrom
dev/mara/telemetry-authenticated-user-id
Oct 6, 2026
Merged

MartinZikmund merged 3 commits into
masterfrom
dev/mara/telemetry-authenticated-user-id

Conversation

@rajamatt

@rajamatt rajamatt commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: related to unoplatform/studio.live#3337 (package side: unoplatform/uno.devtools.telemetry#31, SDK side: unoplatform/uno.licensing#798)

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

Telemetry events from the dev-server process now carry the signed-in Uno account id (the native Application Insights user_AuthenticatedId column). Before this change, dev-server telemetry was never attributed to a user.

  • Uno.Settings.DevServer 1.13.0-dev.7 to 2.0.0-dev.10 in src/Uno.Sdk/packages.json. This add-in carries Uno.Licensing.Sdk 2.0. Its user store publishes the account id to Uno.DevTools.Telemetry's process-wide TelemetryUserContext on sign-in, sign-out and first load, so telemetry clients in the dev-server process that resolve the host's Uno.DevTools.Telemetry pick it up with no per-tool code (see the coverage list below). 2.0 is the licensing line for Uno 7.0, which matches master's 7.0-dev.
  • Uno.DevTools.Telemetry 1.3.3 to 1.4.0-dev.18 in src/Directory.Packages.props, so every project that references it moves together: the host, the server, the dev-server tests and the source generators. 1.4.0-dev.18 is the first build with the store. Add-ins load into the default load context and resolve this assembly to the host's copy, so the host has to be on 1.4 for the add-in's publisher to find the store. That is why both bumps ship together.

Attribution coverage

  • Attributed: dev-server host and add-in events sent after the Settings add-in loads, including Hot Design's server side (it rolls forward to the host's 1.4).
  • Not attributed: host events sent before the add-in loads (startup, addin-discovery-*, addin-loading-*, including addin-loading-error), the host's UNO_PLATFORM_TELEMETRY_FILE sink, the XAML source generators (they move to 1.4 too, but run in the compiler), and IDE extensions running in other processes. Queries on user_AuthenticatedId will undercount accordingly.

Behaviour change (Licensing SDK 2.0)

ILicensingService.GetAccessTokenAsync can now return null, and GetCreditsAsync / ReserveCreditsAsync can throw a transient InvalidOperationException after a cross-process user switch. Hot Design consumes this service through the shared Contracts assembly. 2.0 also fixes a case where the new user's id was paired with the previous user's token. A revert has to take both bumps together.

Docs

uno-toolchain-telemetry.md now covers the dev-server, the account id and the fact that only UNO_PLATFORM_TELEMETRY_OPTOUT silences the dev-server (the UnoPlatformTelemetryOptOut MSBuild property only reaches the XAML generator). The host's Telemetry.md inventory documents user_AuthenticatedId.

Follow-ups before the 7.0 release

  • Move Uno.DevTools.Telemetry to a stable 1.4.x (1.4.0-dev.18 is a prerelease).
  • Uno.Licensing.* assemblies still report AssemblyVersion 1.0.0.0 in 2.0, so AddInVersionAlignmentTests can't tell Settings' and Hot Design's copies apart.

The value is unverified client attribution. Users opt out of all telemetry with UNO_PLATFORM_TELEMETRY_OPTOUT=true, and the privacy policy disclosure is tracked in unoplatform/studio.live#3204 (closed).

AddInVersionAlignmentTests checks that each add-in's load graph resolves against the host without a downgrade. It covers exactly this change, and CI runs it. It could not run locally because master targets .NET 11 and the machine has the .NET 10 SDK.

PR Checklist ✅

🤖 Generated with Claude Code

@rajamatt rajamatt self-assigned this Sep 23, 2026
@rajamatt
rajamatt marked this pull request as draft September 23, 2026 00:40
@rajamatt
rajamatt requested a review from agneszitte September 23, 2026 00:40
@github-actions github-actions Bot added the area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk label Sep 23, 2026
@rajamatt
rajamatt force-pushed the dev/mara/telemetry-authenticated-user-id branch 2 times, most recently from 074bb4b to cc8d82f Compare September 29, 2026 18:22
@rajamatt rajamatt changed the title chore: bump Uno.Settings.DevServer to 2.0.0-dev.10 and the dev-server telemetry package to 1.4.0-dev.18 chore: bump Uno.Settings.DevServer to 2.0.0-dev.10 and Uno.DevTools.Telemetry to 1.4.0-dev.18 Sep 29, 2026
@MartinZikmund

Copy link
Copy Markdown
Member

@rajamatt ready to merge?

@carldebilly carldebilly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving: the two bumps belong together, the add-in alignment check passes, and nothing here should break a build or an add-in load. A few things are worth addressing before merge, mostly in the PR description and the privacy documentation, because the packages pulled in do more than the title suggests.

What this change brings in

  • Every dev-server telemetry event sent after the Settings add-in loads now carries the signed-in account id (user_AuthenticatedId). Hot Design server events are attributed too, with no change on its side (it bundles Telemetry 1.2.1 and rolls forward to the host's 1.4).
  • Licensing SDK 2.0 changes sign-in behaviour: a cross-process user switch restarts the token refresh, and a new transient path can return no token or throw InvalidOperationException from GetCreditsAsync / ReserveCreditsAsync. It also fixes a case where the new user's id was paired with the previous user's token.
  • tools/devserver/Config/sdk.json in the Settings package moves the licensing API base URL from licencing.api.platform.uno to licensing.api.platform.uno (both resolve today).
  • The two bumps are coupled in one direction: Settings 2.0 on a host with Telemetry older than 1.4 (reachable with UnoSettingsVersion on an older SDK) loads a second Telemetry copy and silently loses attribution. A revert has to take both lines together.

Not anchored to a diff line

  • MEDIUM - src/Uno.UI.RemoteControl.Host/Telemetry.md is the GDPR/privacy inventory of dev-server events and does not mention user_AuthenticatedId. Suggest a short note naming the tag, its source (the Settings add-in), the UNO_PLATFORM_TELEMETRY_OPTOUT opt-out and the LicensingSdkOptions:PublishAuthenticatedUserIdToTelemetry switch, in a docs-only commit.

Minor notes

  • Nothing in this repo tests or demonstrates attribution end to end. The host's UNO_PLATFORM_TELEMETRY_FILE sink is its own FileTelemetry, so it cannot show the id for host events; a short manual check on user_AuthenticatedId in Application Insights, grouped by event name, would back the PR's central claim.
  • Add-ins share the host's TelemetryUserContext, so a third-party add-in using Uno.DevTools.Telemetry with its own instrumentation key would also stamp the Uno account id.
  • Unsent events queued in the shared temp directory will now include the account id (on Linux, /tmp is shared between users). Worth confirming upstream.

Worth checking manually

  • Switch accounts in a second process while a host or the IDE is refreshing a token. It is a defect if a raw "No authenticated user" exception reaches the developer, or if the displayed sign-in state does not match the account in use.

Summary: 5 medium, 1 low, 2 info. Approving, with the PR description and documentation updates recommended before merge.

Comment thread src/Uno.Sdk/packages.json Resolved
Comment thread src/Uno.Sdk/packages.json Resolved
Comment thread src/Uno.Sdk/packages.json Resolved
Comment thread src/Uno.Sdk/packages.json Resolved
Comment thread src/Directory.Packages.props Resolved
Comment thread src/Directory.Packages.props Resolved
Comment thread src/Directory.Packages.props Resolved
@MartinZikmund
MartinZikmund marked this pull request as ready for review October 6, 2026 08:44
Copilot AI balanced review requested due to automatic review settings October 6, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The coordinated package bumps are covered by the existing add-in load-graph compatibility gate.

Review effort: Balanced
Findings: None

What changed in this PR

Coordinates DevServer settings and telemetry package upgrades to support authenticated telemetry attribution.

Changes:

  • Upgrades Uno.Settings.DevServer to 2.0.
  • Upgrades the shared telemetry dependency to 1.4 prerelease.
File Description
src/​Uno.Sdk/​packages.json Updates the Settings add-in version.
src/​Directory.Packages.props Updates telemetry across consuming projects.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@unodevops

Copy link
Copy Markdown
Contributor

rajamatt and others added 3 commits October 6, 2026 11:13
…elemetry to 1.4.0-dev.18

Uno.Settings.DevServer 2.0.0-dev.10 carries Uno.Licensing.Sdk 2.0, whose user store publishes the signed-in account id to Uno.DevTools.Telemetry's process-wide TelemetryUserContext, so every telemetry event emitted in the dev-server process while the Uno account is signed in is attributed to it (the native user_AuthenticatedId column). Add-ins load into the default load context and resolve Uno.DevTools.Telemetry to the host's copy, so the central Uno.DevTools.Telemetry version moves to 1.4.0-dev.18, the first build with the store, in the same change. Every project that references it, the source generators included, uses that one version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@MartinZikmund
MartinZikmund force-pushed the dev/mara/telemetry-authenticated-user-id branch from cc8d82f to 0a5f906 Compare October 6, 2026 09:14
@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation labels Oct 6, 2026
@MartinZikmund

Copy link
Copy Markdown
Member

🤖 Addressed PR comments up to this point

Rebased on latest master.

  • @carldebilly (review summary): Telemetry.md now has an "Account attribution" section (tag, source, UNO_PLATFORM_TELEMETRY_OPTOUT, LicensingSdkOptions:PublishAuthenticatedUserIdToTelemetry) — fd37982
  • @carldebilly (minor notes): the coupling/revert note is in the PR body; the end-to-end Application Insights check and the shared /tmp queue question are left for a manual check / upstream
  • 7 review threads replied and resolved

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@mergify

mergify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit ee6b881 into master Oct 6, 2026
62 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mara/telemetry-authenticated-user-id branch October 6, 2026 13:26
agneszitte added a commit that referenced this pull request Nov 3, 2026
chore(deps): Bump Uno.DevTools.Telemetry to 1.4.1 (backport #24594, #25624, #25848)
agneszitte added a commit that referenced this pull request Nov 3, 2026
chore(deps): Bump Uno.DevTools.Telemetry to 1.4.1 (backport #24594, #25624, #25848)
ajpinedam pushed a commit to ajpinedam/uno that referenced this pull request Nov 3, 2026
Backport of unoplatform#24594 (Telemetry part),
unoplatform#25624 and unoplatform#25848.
This branch pins the package in each project, so the master bumps don't apply as-is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ajpinedam pushed a commit to ajpinedam/uno that referenced this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants