How aizikfriedman/synthetic-exporter works
Synthetic Exporter runs configured API/TLS checks and Playwright UI journeys in a background worker, then serves cached Prometheus metrics for scraping. Configuration, check execution, metrics, and the scrape endpoint all live in main.go. The README documents YAML scenarios, API headers, environment-variable secrets, error labels, and metric types; source excerpts confirm the worker, checks, browser actions, and HTTP server. The repository is a compact single-file runtime, so several responsibilities share one source path.
Main entry points: main.go Background worker · config.yaml YAML config
Components 15
Configuration
- YAML config
config.yaml - Config loader
main.go - Secret resolution
main.go - Configured API targets
config.yaml
Synthetic checks
- Background worker
main.go - API and TLS checks
main.go - UI scenarios
main.go - Scenario runner
main.go - Browser step actions
main.go
Metrics and serving
- Metrics registry
main.go - Metrics endpoint
main.go - Health endpoint
main.go
Other components
- Operator
- Prometheus
- Monitored services
Connections 15
- Operator → YAML config: defines checks
README.md - YAML config → Config loader: loads configuration
main.go - Config loader → Secret resolution: resolves secrets
main.go - Config loader → Background worker: starts checks
main.go - Background worker → API and TLS checks: runs checks
main.go - Background worker → UI scenarios: runs journeys
main.go - UI scenarios → Scenario runner: dispatches scenarios
main.go - Scenario runner → Browser step actions: executes steps
main.go - API and TLS checks → Configured API targets: reads targets
main.go - API and TLS checks → Monitored services: checks HTTP and TLS
main.go - Browser step actions → Monitored services: drives browser
main.go - Background worker → Metrics registry: updates metrics
main.go - Metrics endpoint → Metrics registry: serves metrics
main.go - Prometheus → Metrics endpoint: scrapes
README.md - Operator → Health endpoint: checks health
main.go