Skip to content

fix: standardize telemetry property conventions#599

Merged
tnaum-ms merged 1 commit intorel/release_0.8.0from
fix/telemetry-consistency
Apr 22, 2026
Merged

fix: standardize telemetry property conventions#599
tnaum-ms merged 1 commit intorel/release_0.8.0from
fix/telemetry-consistency

Conversation

@tnaum-ms
Copy link
Copy Markdown
Collaborator

Summary

Standardizes telemetry property patterns across the codebase based on the audit from the new telemetry-instrumentation skill.

Changes

Redundant result override (Issue 3)

  • Removed the try/catch in manageCredentials.ts that manually set result = 'Failed' before re-throwing — the callWithTelemetryAndErrorHandling wrapper handles this automatically.

Boolean .toString() → ternary (Issue 4)

  • Converted all booleanValue.toString() patterns to explicit value ? 'true' : 'false' ternaries across:
    • survey.ts (6 instances: isSurveyDisabledGlobally, wasPromptedInSession, scoreTargetReached, isCandidate, acceptedForABTest)
    • CopyPasteCollectionTask.ts (isCrossConnection, targetWasCreated)
    • ruClusterHelpers.ts / clusterHelpers.ts (isCustomCloud)
    • FilterTenantSubStep.ts (allTenantsSelectedForFiltering, noTenantsSelectedForFiltering)
    • extension.ts (enableAIQueryGeneration)

Numbers as properties → measurements (Issue 5)

  • Moved numeric values from properties (string) to measurements (number) so they can be aggregated (P50, avg, sum) in analytics:
    • survey.ts: triggerActionScore, fullScore
    • collectionViewRouter.ts: pageNumber
    • InitializeFilteringStep.ts: tenantCountFromSubscriptions
    • clusterHelpers.ts: receivedAuthMethodsCount

Not changed

  • Naming split (Issue 1): domainInfo_* / serverInfo_* snake_case naming is intentional (prefix-as-namespace for metadata spread) and matched by existing dashboard queries.
  • connectioncorrelationid (Issue 2): Already camelCase on this branch.

Validation

  • npm run prettier-fix
  • npm run lint ✅ (596 pre-existing errors in packages/, none introduced)
  • No TypeScript errors in changed files

- Remove redundant result override in manageCredentials catch block
  (wrapper auto-sets result='Failed' on throw)
- Convert boolean .toString() to explicit ternary pattern across
  survey.ts, CopyPasteCollectionTask.ts, clusterHelpers, extension.ts,
  FilterTenantSubStep.ts
- Move numeric values from string properties to measurements:
  triggerActionScore, fullScore, pageNumber, tenantCountFromSubscriptions,
  receivedAuthMethodsCount
@tnaum-ms tnaum-ms requested a review from a team as a code owner April 22, 2026 11:24
@tnaum-ms tnaum-ms merged commit 773a83f into rel/release_0.8.0 Apr 22, 2026
2 checks passed
@tnaum-ms tnaum-ms deleted the fix/telemetry-consistency branch April 22, 2026 11:26
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.

1 participant