Measuring Everything
You cannot manage what you cannot measure. Prometheus is the standard for cloud-native metrics.
- Use the
prometheus/client_golanglibrary. - Define counters for HTTP requests.
- Expose the
/metricsendpoint.
go var httpRequestsTotal = prometheus.NewCounter(prometheus.CounterOpts{...})