Skip to content

Report BUILDER_FALLBACK metric when falling back to local builder#87

Open
adityamaru wants to merge 5 commits intomainfrom
codesmith/add-builder-fallback-metric
Open

Report BUILDER_FALLBACK metric when falling back to local builder#87
adityamaru wants to merge 5 commits intomainfrom
codesmith/add-builder-fallback-metric

Conversation

@adityamaru
Copy link
Copy Markdown
Contributor

When startBlacksmithBuilder() fails and falls back to a local builder, we now report a BUILDER_FALLBACK failure via reportBuildPushActionFailure() before logging the warning. This lets us track how often users experience fallbacks as a distinct event from the underlying root cause (e.g. BUILDER_STARTUP).

How it works:

  • Adds BUILDER_FALLBACK to the type union in reportBuildPushActionFailure() in src/reporter.ts
  • Calls the reporter in the catch block of startBlacksmithBuilder() in src/main.ts, after the nofallback check but before the warning log and return

The reporter already handles its own errors internally (catches and warns), so a failure to report the metric won't block the fallback path. The companion PR in useblacksmith/web adds BUILDER_FALLBACK to the backend validation rule and two new Grafana panels to the Docker Overview dashboard.


View Codesmith session

@adityamaru adityamaru requested a review from pbardea April 2, 2026 16:03
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