Configuration — Metrics
Buggregator collects metrics on how many events it receives. This feature lets you use tools like Prometheus and Grafana to check on event trends, find issues, and set up alerts.
The metrics system keeps track of how many events Buggregator receives, sorted by their types: sentry, monolog, var-dumper, ray, inspector, http-dump, profiler, and smtp. Webhook deliveries are also tracked.
How It Works
- Event Counting: Each time an event is received, it’s counted and sorted into its type.
- Metric Updating: The system updates the metrics to show the latest counts for each event type.
Prometheus Endpoint
Buggregator has a built-in Prometheus friendly endpoint that you can use to collect metrics. Metrics are available at 2112 port inside the container. To access the metrics outside the container, you need to expose the port.
docker run --pull always \
... \
-p 2112:2112 \
ghcr.io/buggregator/server:latestNote: Read more about server configuration here.
After starting the server, you can access the metrics at http://<server_address>:2112 address.
Metric Format
Here is what the metric format looks like:
# HELP events The total number of received events.
# TYPE events counter
events{type="sentry"} 10
events{type="smtp"} 1Each line shows how many events of a specific type we have received.
Grafana Integration
You can use these metrics to make dashboards in Grafana. This helps you see the data in a way that makes sense for you. We will provide steps on how to connect Buggregator’s metrics to Grafana.
Setting Up Grafana
- Add Prometheus as a Data Source: First, connect Prometheus (which has your Buggregator metrics) to Grafana.
- Create Dashboards: Next, create dashboards in Grafana to show the metrics. You can make graphs and charts that help you understand the event trends.