Prometheus + Grafana Monitoring
5/14/25Less than 1 minutecomponentgrafanaprometheusmetrics
Monitoring System Architecture
Services created by sponge support a complete monitoring data pipeline:
- Metric Exposure: The service program exposes metrics data through the built-in component.
- Data Collection: Prometheus is responsible for scraping and storing metrics.
- Visualization: Grafana provides rich dashboard functionality.
Monitoring Examples
- Click here to view the web service metric collection example.
- Click here to view the gRPC service metric collection example.
- Click here to view the monitoring web service and gRPC service example.
Basic Configuration
app:
enableMetrics: true # Whether to enable metric collection, true: enabled, false: disabled
By default, monitoring data is exposed through the
/metrics
endpoint, no additional configuration is required.