Skip to content

aksd: telemetry: stamp app version on every event#774

Merged
illume merged 1 commit into
Azure:mainfrom
gambtho:telemetry-app-version
Jul 17, 2026
Merged

aksd: telemetry: stamp app version on every event#774
illume merged 1 commit into
Azure:mainfrom
gambtho:telemetry-app-version

Conversation

@gambtho

@gambtho gambtho commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Problem

The recent telemetry privacy hardening only attached the appVersion property to headlamp.session-start and headlamp.exception events. 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 the appVersion custom dimension our queries read.

Observed in production: headlamp.feature envelopes arrive with no version field.

Change

Generalize the appVersion stamping in send() from headlamp.exception to all events, so every envelope carries the version as a customDimensions.appVersion property. appVersion is already in the TELEMETRY_PROPERTY_KEYS allowlist, so no schema change is needed.

Testing

  • envelope.test.ts now asserts the serialized headlamp.feature batch carries properties.appVersion (end-to-end serialization test).
  • All 186 telemetry tests pass; tsc, lint, and format --check clean under Node 20.

Copilot AI review requested due to automatic review settings July 17, 2026 01:39

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.

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 appVersion stamping in send() so all events include properties.appVersion when initializedAppVersion is available.
  • Extend the real-envelope serialization test to assert headlamp.feature includes appVersion in 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
gambtho force-pushed the telemetry-app-version branch from ecafc7f to 110c4e1 Compare July 17, 2026 02:01
Copilot AI review requested due to automatic review settings July 17, 2026 02:01

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@illume illume left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🎉 thanks!

@illume
illume merged commit e257f55 into Azure:main Jul 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants