Repository navigation
fix(integrations): vendor refusals and outages are connection health, not error issues - #2708
Conversation
… not error issues A customer's missing permission, plan limit or a vendor 5xx used to fail a span on every poll and open an error issue. The vendor HTTP attempt span now fails only on an answer it cannot decode; Cloudflare analytics logs tenant and vendor failures as a warning on the rows' health; Supabase reads and Vercel drain creation keep handled refusals off their spans.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
…flare seam comments
This comment has been minimized.
This comment has been minimized.
|
@maple-review-bot won't fix F3: the |
|
Checked the head ( F2 — resolved. The doc block and the exception-event comment now match the code: the warning return is at F3 — dismissed, you're right. One inversion worth a glance while you're here: in the same classifier the genuinely-ours case is now quiet. An undecodable 200 body becomes Dismissed F3. Marked F2 resolved. |
|
Inversion fixed in 9fda746: Supabase decode mismatches now carry kind |
Maple review🟢 Confidence 10/10 · safe to merge. The classifier the four wrappers use is pinned by a test through Adds a
|
What
Integration pollers opened an error issue every time a customer's grant, plan or a vendor outage refused a call. These failures are connection health: the poller already writes them to the connection's state and source health. This stops them from failing spans.
vendor-http.ts): theVendorHttp.requestattempt span now fails only when the answer can't be decoded. Refusals (401/402/403/404/429), vendor 5xx, transport failures and timeouts keeperror.typeand the status code on an Ok span. The caller still gets the same typed error. Cloudflare retries a 403 "auth blip" up to 9 times per call, and every attempt used to be a separate error event.authz,revoked,billingandupstreamdataset failures log a warning. They still land on the rows'lastError, the poll summary and source health. Onlyother(an unrecognised GraphQL error, which could be our query) still raisesCloudflareAnalyticsPollError. One org whose token can't read workers/DO/queue analytics raised 4 errors every 5 minutes, ~8k events since 11-08.vendorCallSpan: a new helper for client wrapper spans. A failure the caller handles is recorded aserror.typeinstead of failing the span. Applied to the Supabase reads (queryLogs,listLogDrains,getAdvisors,getTopQueries) and to VercelcreateDrain, whose plan and permission refusals are already turned into a 400 the user can act on.Unhandled failures still fail the caller's own span or the HTTP server span, so real bugs stay visible.
Verification
bunx vitest runon vendor-http, CloudflareAnalyticsService, GcpMetricsService, GithubAppClient.span, CloudflareApi, Supabase{Connection,Insights,Logs}Service, supabase/logs and VercelIntegrationService: 7 files, 201 tests pass.fails the attempt span only on an undecodable answer, not on a refusal or outagevendorCallSpan keeps an expected failure off the span and still fails the calla zone authz failure is the connection's health, not an exception event: fails without the fix (9 failed spans)an unrecognised GraphQL error still fails its spantsc --noEmitfor packages/backend,oxlint -c .oxlintrc.effect.jsonon the changed files.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.