A high-performance API endpoint monitoring service built with Bun and Elysia. Monitor your API endpoints in real-time, track latency, success rates, and get instant alerts when things go wrong. Built by Tapestry.
- π High Performance: Built with Bun and Elysia for blazing-fast monitoring
- π Real-time Metrics: Track latency, success rates, and status codes
- π Automatic Retries: Configurable retry attempts for failed requests
- ποΈ Flexible Configuration: Support for various HTTP methods, headers, and authentication types
- π Grafana Integration: Push metrics directly to Grafana Cloud
- π Alert System: Set up alerts for latency thresholds and success rates
- π Secure: Support for various authentication methods (API Key, Bearer Token, Basic Auth)
- π¨ Beautiful UI: Swagger documentation and URL management interface
-
Clone the repository
git clone https://github.com/primitives-xyz/tap-tap.git cd tap-tap
-
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration
-
Start the server
bun run start
PORT
: Server port (default: 5050)NODE_ENV
: Environment (development/production)DB_PATH
: SQLite database pathDEFAULT_INTERVAL
: Default monitoring interval in msGRAFANA_*
: Grafana Cloud configuration- Add your API keys as needed
Configure default endpoints to monitor in src/config/default-endpoints.ts
. Here's an example with different authentication methods:
export const defaultEndpoints: DefaultEndpoint[] = [
{
name: "API with Query Parameter Auth",
url: "https://api.example.com/endpoint",
method: "GET",
interval: 30000,
auth: {
type: "apiKey",
envVar: "API_KEY",
location: "query", // This will add the key as ?apiKey=your_key
paramName: "apiKey",
},
},
{
name: "API with Header Auth",
url: "https://api.example.com/endpoint",
method: "GET",
auth: {
type: "apiKey",
envVar: "API_KEY",
location: "header", // This will add the key as X-API-Key header
paramName: "X-API-Key",
},
},
{
name: "API with Bearer Token",
url: "https://api.example.com/endpoint",
method: "GET",
auth: {
type: "bearer",
envVar: "API_TOKEN", // Will add Authorization: Bearer your_token
},
},
];
Example URL with query parameter auth: https://api.example.com/endpoint?apiKey=your_key_here
GET /
: View active endpointsGET /docs
: Swagger documentationPOST /endpoints
: Add new endpoint to monitorDELETE /endpoints/:url
: Stop monitoring endpointPOST /alerts
: Configure alertsGET /alerts/:endpoint
: Get alert configurationDELETE /alerts/:endpoint
: Remove alert configuration
# Run in development mode
bun run dev
# Run tests
bun test
# Format code
bun run format
# Lint code
bun run lint
Includes configuration for Fly.io deployment:
fly launch
fly deploy
Metrics are pushed to Grafana Cloud in InfluxDB line protocol format:
endpoint_latency
: Response time in millisecondsendpoint_success
: Binary success indicator (0/1)endpoint_status
: HTTP status code
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details
- Nicholas Oxford (@nicholasoxford) - nicholasoxford.com
Built with β€οΈ by Tapestry