Skip to content

Telemetry docs: document appVersion stamping per-channel (frontend customDimension vs backend app_Version column) #409

Description

@geevensingh

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:

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.
  • Cross-link from PR back to Telemetry coverage expansion: backend Functions #71 and PR Add backend telemetry: blob.autoDeleted, blob.versionConflict, slug.collisions.exhausted (#71) #403.

References

  • 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).
  • PR Add backend telemetry: blob.autoDeleted, blob.versionConflict, slug.collisions.exhausted (#71) #403 architect rubber-duck finding 3 (cross-site inconsistency surfaced).

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:lowLow priority - nice to have, no urgencytech-debtCleanup, refactoring, or paying down shortcuts

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions