Skip to content

Add realm/tenant telemetry context and debug logging#140

Merged
clavery merged 1 commit intomainfrom
feature/realm-telemetry
Feb 12, 2026
Merged

Add realm/tenant telemetry context and debug logging#140
clavery merged 1 commit intomainfrom
feature/realm-telemetry

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented Feb 12, 2026

Summary

  • Enrich telemetry events with realm, tenantId, shortCode, and configSources extracted from the resolved CLI configuration (addTelemetryContext() in BaseCommand)
  • Add opt-in telemetry trace logging gated by SFCC_TELEMETRY_LOG=true — logs start/stop, events, exceptions, and attribute additions at debug level with zero overhead when disabled
  • Add tests for both realm context enrichment and debug logging behavior

Test plan

  • pnpm --filter @salesforce/b2c-tooling-sdk run test:agent — 1257 passing
  • pnpm --filter @salesforce/b2c-cli run test:agent — 464 passing
  • pnpm --filter @salesforce/b2c-tooling-sdk run lint:agent — clean
  • Manual: SFCC_TELEMETRY_LOG=true ./cli sandbox:list --debug shows telemetry trace lines

@clavery clavery requested a review from yhsieh1 February 12, 2026 22:58
@clavery clavery force-pushed the feature/realm-telemetry branch 2 times, most recently from 2a7fad8 to 7f43575 Compare February 12, 2026 23:12
Enrich telemetry events with realm, tenantId, shortCode, and configSources
from resolved configuration. Add opt-in trace logging to the Telemetry class
gated by SFCC_TELEMETRY_LOG=true for debugging telemetry flow.
@clavery clavery force-pushed the feature/realm-telemetry branch from 7f43575 to 5c4d4e8 Compare February 12, 2026 23:13
Copy link
Copy Markdown
Contributor

@yhsieh1 yhsieh1 left a comment

Choose a reason for hiding this comment

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

It looks good.

@clavery clavery merged commit ad56eda into main Feb 12, 2026
3 checks passed
@clavery clavery deleted the feature/realm-telemetry branch February 12, 2026 23:19
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.

2 participants