docs: scope client attempt-id and workspace-scoping for billing telemetry (Phase B) - #14227
docs: scope client attempt-id and workspace-scoping for billing telemetry (Phase B)#14227claude[bot] wants to merge 2 commits into
Conversation
- Fire trackBillingEvent directly from useWorkspaceBilling's cancelSubscription when the initiating API call fails before a billing_op_id exists, so this failure mode isn't silently untelemetered (the poller-based path is left untouched). - Restore trackMonthlySubscriptionSucceeded alongside the new trackBillingEvent call in billingOperationStore and useSubscriptionCheckout, so the seven providers that don't implement trackBillingEvent keep getting a success signal. - Add resubscribe outcome telemetry on the legacy rail (useResubscribe, useSubscriptionCheckout), exposing an unwrapped subscribeDirect in useSubscription so legacy resubscribe failures actually propagate instead of being swallowed by wrapWithErrorHandlingAsync. - Replace hardcoded failure_category: 'unknown' with real categorization (network/api_rejected/provider_decline) based on the error or context actually available at each site, via a new shared categorizeBillingApiError helper. - Fixes #14111 gap-closure audit findings
…etry phase B Adds a Problem/Options/Tradeoffs/Recommendation scoping doc for two incident-88 Phase B decisions: a client-side billing_attempt_id for pre-response failure correlation, and workspace_id/PostHog group association for workspace-level funnel breakdowns.
🎭 Playwright: ✅ 1735 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.15 MB gzip 🔴 +918 BDetailsSummary
Category Glance App Entry Points — 3.64 kB (baseline 3.64 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.28 MB (baseline 1.28 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 112 kB (baseline 112 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 29.1 kB (baseline 29.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 121 kB (baseline 121 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 5 added / 5 removed / 1 unchanged UI Components — 64.8 kB (baseline 64.8 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 8 unchanged Data & Services — 3.41 MB (baseline 3.41 MB) • 🔴 +2.66 kBStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 369 kB (baseline 369 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 15 added / 15 removed / 20 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.5 MB (baseline 12.5 MB) • 🔴 +348 BBundles that do not match a named category
Status: 69 added / 69 removed / 208 unchanged ⚡ Performance
|
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14227 +/- ##
==========================================
+ Coverage 78.80% 78.85% +0.05%
==========================================
Files 1750 1753 +3
Lines 115133 115537 +404
Branches 38007 37345 -662
==========================================
+ Hits 90727 91104 +377
- Misses 23777 23787 +10
- Partials 629 646 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 14 files with indirect coverage changes 🚀 New features to boost your workflow:
|
<!-- ccr-slack-attribution -->
Requested by Christian Byrne · Slack thread
This adds a scoping doc for two incident-88 Phase B design decisions that don't yet have a written recommendation: a client-side
billing_attempt_idto correlate billing failures that happen before any server-issuedbilling_op_idexists, and aworkspace_id/PostHog-group association so billing funnels and Datadog RUM sessions can be segmented by workspace. Each item covers Problem/Options/Tradeoffs/Recommendation/Open questions, grounded in the currentgetBillingTelemetryEventPayload()payload shape,billingOperationStore.ts's operation lifecycle, and the existing (group-less) PostHog/Datadog RUM provider code. Docs-only, no code changes.See
docs/telemetry/incident-88-master-plan.mdfor the overall initiative this scopes into (Phase B, items 7–10).Generated by Claude Code