You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered while addressing PR #403 review feedback for #71 (Telemetry coverage expansion: backend Functions). The architect rubber-duck panel surfaced a cross-channel doc inconsistency that's out of scope for a single-site fix.
Background
docs/telemetry.md has at least four KQL examples that read an "app version" stamp, and they don't agree on the channel:
Frontend queries (these work today; the frontend telemetry pipeline explicitly stamps appVersion as a custom dimension via setBuildInfo initializer):
There's no single doc statement of "which column carries the version stamp on which channel", and the next operator writing a cross-tier KQL query will trip over it.
Acceptance criteria
Add a docs section (somewhere in docs/telemetry.md near the Backend events / Frontend events boundary, or a new "App version stamping" subsection) that documents:
Frontend customEvents carry customDimensions.appVersion (set by the SPA's telemetry init).
Backend customEvents carry the version in the built-in App Insights app_Version column only if the deployment writes client.context.tags[client.context.keys.applicationVersion] at SDK init -- which today it does not.
Either (a) accept that backend events have no per-event version stamp and use a deploy-marker join when needed, or (b) wire the SDK init to set the tag from WEBSITE_DEPLOYMENT_ID / build SHA / package.json version.
If (b) is chosen: update api/src/shared/telemetry.ts to set the tag at TelemetryClient construction. Add a backend test asserting the tag is set.
If (a) is chosen: document the deploy-marker join pattern with a working KQL example.
docs/telemetry.md Slug-collision exhaustion KQL example (the change that surfaced this -- comment in the KQL block points to app_Version / deploy-marker join as the two viable options).
api/src/shared/telemetry.ts -- backend TelemetryClient construction site (does not currently set the application-version tag).
src/app/core/telemetry/ -- frontend pipeline that stamps appVersion as a custom dimension (the model to NOT necessarily copy).
Discovered while addressing PR #403 review feedback for #71 (Telemetry coverage expansion: backend Functions). The architect rubber-duck panel surfaced a cross-channel doc inconsistency that's out of scope for a single-site fix.
Background
docs/telemetry.mdhas at least four KQL examples that read an "app version" stamp, and they don't agree on the channel:appVersionas a custom dimension viasetBuildInfoinitializer)::1077web-vitals roll-up:customDimensions['appVersion']:1329Health workbook reference:customDimensions.appVersioncustomDimensions.appVersion-- which the backendtrackEventnever sets. Add backend telemetry: blob.autoDeleted, blob.versionConflict, slug.collisions.exhausted (#71) #403 dropped the projection rather than silently swap to the built-inapp_Versioncolumn without verifying it's populated.There's no single doc statement of "which column carries the version stamp on which channel", and the next operator writing a cross-tier KQL query will trip over it.
Acceptance criteria
docs/telemetry.mdnear the Backend events / Frontend events boundary, or a new "App version stamping" subsection) that documents:customEventscarrycustomDimensions.appVersion(set by the SPA's telemetry init).customEventscarry the version in the built-in App Insightsapp_Versioncolumn only if the deployment writesclient.context.tags[client.context.keys.applicationVersion]at SDK init -- which today it does not.WEBSITE_DEPLOYMENT_ID/ build SHA /package.jsonversion.api/src/shared/telemetry.tsto set the tag at TelemetryClient construction. Add a backend test asserting the tag is set.References
docs/telemetry.mdSlug-collision exhaustion KQL example (the change that surfaced this -- comment in the KQL block points toapp_Version/ deploy-marker join as the two viable options).api/src/shared/telemetry.ts-- backend TelemetryClient construction site (does not currently set the application-version tag).src/app/core/telemetry/-- frontend pipeline that stampsappVersionas a custom dimension (the model to NOT necessarily copy).