Skip to main content

Prometheus Metrics

Posta exposes Prometheus-compatible metrics for production monitoring when enabled.

Enabling Metrics

POSTA_METRICS_ENABLED=true

Available Metrics

MetricTypeDescription
HTTP request countCounterTotal HTTP requests by method, path, status
HTTP request durationHistogramRequest latency by endpoint
Emails sentCounterTotal emails successfully sent
Emails failedCounterTotal email delivery failures
Emails queuedCounterTotal emails added to queue
Emails retriedCounterTotal email retry attempts
Webhook deliveriesCounterWebhook delivery attempts (success/failed)
Webhook durationHistogramWebhook delivery latency

Scrape Configuration

Add Posta to your Prometheus configuration:

scrape_configs:
- job_name: 'posta'
static_configs:
- targets: ['posta:9000']
metrics_path: '/metrics'

Grafana Dashboard

Use the exposed metrics to build Grafana dashboards for:

  • Email delivery rate over time
  • Failure rate and error trends
  • Queue depth and processing latency
  • Webhook delivery reliability
  • API request volume and latency