Awesome Reviewers

Adopt a single standard for all observability code:

1) Be policy-compliant and opt-out safe

2) Ensure attribution is correct (per-turn, per-retry)

3) Keep metrics specific and non-inflating

4) Preserve trace/span lifecycle ordering

5) Avoid false samples in observations

6) Keep observability from mutating core behavior

Practical pattern (safe helper + fixed payload shape)

// telemetry helpers: fixed catalog event + fixed properties; never throws
export function capturePendingPromptsDiscarded(
  telemetry: ITelemetryService | undefined,
  details: { sessionId: string; count: number; reason: 'queue_abort' | 'session_teardown' },
): void {
  if (!telemetry?.isEnabled()) return;
  try {
    telemetry.capture({
      event: CORE_TELEMETRY_EVENTS.SESSION.PENDING_PROMPTS_DISCARDED,
      properties: { ...details },
    });
  } catch {
    // observability must not break execution
  }
}

Checklist for PRs touching observability