Skip to content

Introduction

Synthetic Exporter is an enterprise-grade, high-performance synthetic monitoring exporter written in Go.

Its main goal is to continuously check API HTTP statuses, TLS certificate expiration timestamps, and execute full multi-step headless browser UI user journeys via Playwright for Go. It exposes all these rich data points as Prometheus metrics.

Why Synthetic Exporter?

Traditional uptime monitoring just pings an endpoint to check if the server is responding. However, modern applications can have complex failure modes where the server responds with HTTP 200, but a frontend bug prevents users from logging in or adding items to their cart.

Synthetic monitoring simulates real user interactions (e.g., clicking buttons, filling out forms) in a real browser, ensuring that the critical paths of your application are actually working end-to-end.

Key Features

  • Declarative YAML Configuration: Easily define your synthetic user journeys with modular actions (goto, fill, click, wait_for_selector, screenshot) without writing code.
  • Custom Error Labelling: Map step-specific failures to predefined error_type_name labels (e.g., login_failed, cart_button_missing). This allows for instant alert categorization and faster incident resolution.
  • Secure Secret Management: You can reference environment variables directly in your configuration (like ${ENV_VAR}). This ensures your sensitive credentials are never hardcoded in the configuration files.
  • Playwright for Go Integration: Utilizes full headless browser automation to ensure highly reliable UI testing and interaction timing.
  • Rich Prometheus Metrics: Exposes HTTP status codes, SSL certificate expiration timestamps (Unix epoch seconds), step duration timing, and journey error counts. All metrics are labeled by service for easy multi-tenant aggregation.
  • Background Worker Architecture: Synthetic checks run in a background goroutine on a configurable interval. When Prometheus scrapes the /metrics endpoint, it instantly receives cached metrics—meaning no browser is launched precisely during the scrape, which prevents timeouts and race conditions.
  • Production-Ready Containerization: Includes a multi-stage Dockerfile leveraging the official Playwright image. It uses dumb-init as PID 1 to gracefully reap zombie Chromium processes and ensure non-root execution.

Next, see how to get the exporter running locally or in Docker in the Getting Started guide.

Released under the MIT License.