Affected: All SDKs
Overview
Prometheus is an open-source monitoring system that collects and stores metrics as time series data. You can configure Relay Proxy to export its internal statistics and traces so that Prometheus can scrape them for visualization and alerting.
Solution
Here’s how to configure Relay Proxy to export metrics to Prometheus:
1. Add Prometheus to your Relay configuration
In your Relay configuration file (for example, relay-config.yaml) add Prometheus.
Example:
[Prometheus] enabled = false port = 8031 prefix = ""
2. Restart Relay Proxy
Apply the new configuration by restarting your Relay Proxy instance.
3. Configure Prometheus to scrape Relay Proxy
In your Prometheus configuration file (prometheus.yml), add a scrape job for Relay Proxy.
Example:
scrape_configs:
- job_name: 'ld_relay'
metrics_path: /metrics
static_configs:
- targets: ['your-relay-proxy.com:8030']Resources