Skip to content

feat: add Sentry tunnel and route error tracking through s.archgate.dev#266

Merged
rhuanbarreto merged 3 commits into
mainfrom
feat/sentry-tunnel
May 4, 2026
Merged

feat: add Sentry tunnel and route error tracking through s.archgate.dev#266
rhuanbarreto merged 3 commits into
mainfrom
feat/sentry-tunnel

Conversation

@rhuanbarreto

@rhuanbarreto rhuanbarreto commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Route CLI error tracking through s.archgate.dev/tunnel instead of ingest.de.sentry.io directly — mirrors the PostHog proxy at n.archgate.dev
  • The tunnel server lives in the archgate/services repo and is deployed on Railway

Test plan

  • bun run validate passes (lint, typecheck, format, 690 tests, 23/23 ADR rules, build)
  • Deploy tunnel to Railway from archgate/services repo
  • Verify health check at s.archgate.dev/health
  • Trigger a test error and verify it appears in Sentry dashboard

Add a lightweight Sentry envelope tunnel server (services/sentry-tunnel/)
that receives envelopes from the CLI and forwards them to Sentry's ingest
endpoint. This mirrors the PostHog managed proxy at n.archgate.dev —
routing through our own domain improves reliability behind corporate
proxies and ad-blockers.

Tunnel server:
- Bun HTTP server with envelope header parsing and DSN extraction
- Project ID allowlist via ALLOWED_PROJECT_IDS env var
- Health check at /health, accepts POST at / and /tunnel
- Dockerfile for Railway deployment

CLI change:
- Add tunnel: "https://s.archgate.dev/tunnel" to Sentry.init()
  so the SDK sends envelopes to our tunnel instead of directly
  to ingest.de.sentry.io

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 4, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 519e1bc
Status: ✅  Deploy successful!
Preview URL: https://935678c6.archgate-cli.pages.dev
Branch Preview URL: https://feat-sentry-tunnel.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto merged commit 38c6a82 into main May 4, 2026
10 checks passed
@rhuanbarreto rhuanbarreto deleted the feat/sentry-tunnel branch May 4, 2026 21:44
@archgatebot archgatebot Bot mentioned this pull request May 4, 2026
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.

1 participant