Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgxPoolStatsCollector ¶ added in v0.2.0
type PgxPoolStatsCollector struct {
// contains filtered or unexported fields
}
PgxPoolStatsCollector is a Prometheus collector for pgx metrics. It implements the prometheus.Collector interface.
func NewPgxPoolStatsCollector ¶ added in v0.2.0
func NewPgxPoolStatsCollector(db *pgxpool.Pool, dbName string) *PgxPoolStatsCollector
NewPgxPoolStatsCollector returns a new pgxCollector. The dbName parameter is used to set the "db" label on the metrics. The db parameter is the pgxpool.Pool to collect metrics from. The db parameter must not be nil. The dbName parameter must not be empty.
func (PgxPoolStatsCollector) Collect ¶ added in v0.2.0
func (p PgxPoolStatsCollector) Collect(metrics chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (PgxPoolStatsCollector) Describe ¶ added in v0.2.0
func (p PgxPoolStatsCollector) Describe(descs chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
Click to show internal directories.
Click to hide internal directories.