aksd: telemetry: stamp app version on every event#774
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AKS Desktop telemetry layer so that every telemetry event sent via Application Insights is stamped with the initialized appVersion, enabling reliable correlation by release across all event types (not just exceptions).
Changes:
- Generalize
appVersionstamping insend()so all events includeproperties.appVersionwheninitializedAppVersionis available. - Extend the real-envelope serialization test to assert
headlamp.featureincludesappVersionin its serialized properties.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/aks-desktop/src/telemetry/index.ts | Stamps properties.appVersion onto all tracked events when telemetry has an initialized app version. |
| plugins/aks-desktop/src/telemetry/envelope.test.ts | Verifies the serialized headlamp.feature envelope includes appVersion in baseData.properties. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The telemetry hardening only attached the appVersion property to session-start and headlamp.exception. Every other event -- feature, cluster-shape, plugins-loaded -- carried no app version, so those events could not be correlated by release in the appVersion dimension our queries read. Generalize the appVersion stamping in send() from headlamp.exception to all events, so every envelope carries the version as a property.
gambtho
force-pushed
the
telemetry-app-version
branch
from
July 17, 2026 02:01
ecafc7f to
110c4e1
Compare
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.
Problem
The recent telemetry privacy hardening only attached the
appVersionproperty toheadlamp.session-startandheadlamp.exceptionevents. Every other event —headlamp.feature,headlamp.cluster-shape,headlamp.plugins-loaded— carried no app version at all, so those events could not be correlated by release in theappVersioncustom dimension our queries read.Observed in production:
headlamp.featureenvelopes arrive with no version field.Change
Generalize the
appVersionstamping insend()fromheadlamp.exceptionto all events, so every envelope carries the version as acustomDimensions.appVersionproperty.appVersionis already in theTELEMETRY_PROPERTY_KEYSallowlist, so no schema change is needed.Testing
envelope.test.tsnow asserts the serializedheadlamp.featurebatch carriesproperties.appVersion(end-to-end serialization test).tsc,lint, andformat --checkclean under Node 20.