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
fix(telemetry): centralize sentry.org/project tags in resolution functions
Move setOrgProjectContext() from individual command files into the shared
resolution functions in resolve-target.ts, trace-target.ts, and
dashboard/resolve.ts. This ensures every command that resolves an org or
project automatically gets sentry.org and sentry.project telemetry tags,
eliminating the class of bugs where a command forgets to call setContext().
Previously ~15 commands manually called this.setContext() after resolution,
while ~15 others (all dashboard/*, event/view, project/*, trial/*, org/view)
forgot — causing missing telemetry tags on error events.
Changes:
- Add setOrgProjectContext calls to 6 functions in resolve-target.ts
- Add setOrgProjectContext calls to 2 functions in trace-target.ts
- Add setOrgProjectContext call to resolveOrgFromTarget in dashboard/resolve.ts
- Remove setContext from SentryContext interface and buildContext
- Remove all manual setContext calls from 12 command files
- Update 35 test files to remove setContext from mock contexts
- Delete 7 test blocks that asserted setContext was called
0 commit comments