Prometheus holds Prometheus metrics and configuration
| 23 | |
| 24 | // Prometheus holds Prometheus metrics and configuration |
| 25 | type Prometheus struct { |
| 26 | config *Config |
| 27 | stats *stats.Stats |
| 28 | |
| 29 | requestsTotal prometheus.Counter |
| 30 | statusCodesTotal *prometheus.CounterVec |
| 31 | errorsTotal *prometheus.CounterVec |
| 32 | |
| 33 | requestDuration prometheus.Histogram |
| 34 | requestSpanDuration *prometheus.HistogramVec |
| 35 | |
| 36 | workers prometheus.Gauge |
| 37 | } |
| 38 | |
| 39 | // New creates a new Prometheus instance |
| 40 | func New(config *Config, stats *stats.Stats) (*Prometheus, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected