Skip to content

Introduction ​

Synthetic Exporter is a synthetic monitoring exporter written in Go.

It checks API HTTP status codes, TLS certificate expiration dates, and runs multi-step headless browser UI scenarios using Playwright for Go. It exports these data points as Prometheus metrics.

Why Synthetic Exporter? ​

Basic uptime monitoring pings an endpoint to check if the server responds. But modern apps fail in complex ways. A server might return HTTP 200, while a frontend bug stops users from logging in or adding items to a cart.

Synthetic monitoring runs real user interactions (like clicking buttons and filling out forms) in a real browser. This helps you verify that the main flows of your application work end-to-end.

Key Features ​

  • YAML Configuration: Write your UI scenarios with simple actions (goto, fill, click, wait_for_selector, screenshot) without writing Go code.
  • Custom Error Labels: Map step failures to specific error_type_name labels (like login_failed or cart_button_missing). This helps you group alerts and find problems faster.
  • Secret Management: Use environment variables directly in your config (like ${ENV_VAR}). This keeps your passwords and tokens out of version control.
  • Playwright for Go: Uses headless browser automation to test the UI and measure step duration.
  • Prometheus Metrics: Exports HTTP status codes, SSL certificate expiration dates, step duration, and error counts. Metrics are labeled by service to help you separate different applications.
  • Background Worker: Checks run in a background goroutine on a set schedule. When Prometheus scrapes /metrics, it gets cached data. This prevents scrape timeouts.
  • Docker Support: Includes a multi-stage Dockerfile based on the official Playwright image. It uses dumb-init to clean up old Chromium processes and runs as a non-root user.

Next, see how to build and run the exporter in the Getting Started guide.

Released under the MIT License.