Skip to content

feat(api): drain telemetry to axiom and return structured errors - #102

Merged
okisdev merged 1 commit into
mainfrom
obs/axiom-drain
Aug 31, 2026
Merged

feat(api): drain telemetry to axiom and return structured errors#102
okisdev merged 1 commit into
mainfrom
obs/axiom-drain

Conversation

@okisdev

@okisdev okisdev commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

problem

the worker had observability enabled but no destination, no error handler, and no notFound handler: 5xx and unmatched routes were invisible outside the Cloudflare dashboard and returned Hono's default text bodies while every real route speaks JSON.

change

move the wrangler observability block to the nested logs/traces form with axiom-logs / axiom-traces destinations and invocation logs on, and add api.onError (structured console.error plus a JSON 500) and api.notFound (JSON 404) matching the existing { error: { message, status } } shape.

verification

wrangler deploy --dry-run passes with the new config. after deploy the modelpedia-api script name appears in the Axiom cloudflare dataset and route errors carry method and path.

Track in Rupic

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
modelpedia-web Skipped Skipped Aug 31, 2026 4:37am

@rupic-app

rupic-app Bot commented Aug 31, 2026

Copy link
Copy Markdown

Comment Reviewed in 3m 39s · Round 1 · comment · b5b626a

Merge as is — The API error handling and observability wiring are implemented, with runtime delivery unverified

The API changes address a real gap: the source now provides structured 404 and 500 responses, logs the request method and path, and the Wrangler configuration references separate log and trace destinations. The diff does not add request-level tests for these new paths, and I could not execute the reported dry-run or verify deployed Axiom delivery; these are non-blocking coverage and verification limitations.

Worth noting, not blocking

  • The new 404 and 500 paths are untested; request-level coverage should assert unmatched routes, thrown handlers, response statuses, JSON bodies, and method/path logging.

Merge state: The PR is reported as open and mergeable. Vercel Preview Comments is successful; the other listed checks are null. Approval state and unresolved review threads are unknown.

Evidence · 1 verified · 3 not verified

Verified

  • The worker previously had observability enabled without a destination.
    The prior configuration shown in the diff has no destination entries.

Not verified

  • The deployed worker drains logs and traces to Axiom.
    The source wiring is present, but the reported deployed dataset result could not be independently verified.
  • wrangler deploy --dry-run passes with the new configuration.
    Configuration validity remains unverified in this review.
  • Route errors carry the request method and path.
    The implementation contains the requested fields, while the deployed behavior remains unverified.

Both changed files and adjacent API, package, configuration, workflow, and contribution files were read. No command or request was executed, so the reported dry-run, deployed Axiom delivery, and actual route dispatch remain unverified. No prior review threads or ledger findings were supplied.

Round Commit Verdict Took When
1 b5b626a comment 3m 39s 2026-08-31 04:41 UTC

Comment @rupic-app stop reviewing to stop reviewing this PR.

Review by Rupic.

@rupic-app rupic-app Bot added stage/needs-review No reviews yet; waiting for a maintainer app/api Changes an app under apps/ R1 Actionable, normal priority type/feature New feature or capability size/S 10–49 lines changed labels Aug 31, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
modelpedia-api b5b626a Commit Preview URL

Branch Preview URL
Aug 31 2026, 04:38 AM

@okisdev
okisdev merged commit 77b548b into main Aug 31, 2026
11 checks passed
@okisdev
okisdev deleted the obs/axiom-drain branch August 31, 2026 04:43
@rupic-app rupic-app Bot added stage/merged Merged into the default branch and removed stage/needs-review No reviews yet; waiting for a maintainer R1 Actionable, normal priority labels Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app/api Changes an app under apps/ size/S 10–49 lines changed stage/merged Merged into the default branch type/feature New feature or capability

Development

Successfully merging this pull request may close these issues.

1 participant