Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ConnInUse = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_in_use", Help: "The number of connections currently in use", }, []string{sqlInstance}, ) ConnIdle = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_idle", Help: "The number of idle connections", }, []string{sqlInstance}, ) ConnWait = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_wait", Help: "The total number of connections wait for", }, []string{sqlInstance}, ) ConnIdleClosed = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_idle_closed", Help: "The total number of connections closed because of SetMaxIdleConns", }, []string{sqlInstance}, ) ConnIdleTimeClosed = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_idle_time_closed", Help: "The total number of connections closed because of SetConnMaxIdleTime", }, []string{sqlInstance}, ) ConnLifetimeClosed = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_lifetime_closed", Help: "The total number of connections closed becase of SetConnMaxLifetime", }, []string{sqlInstance}, ) ConnWaitMS = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "go_sql_conn_wait_ms", Help: "The total time blocked by waiting for a new connection, millisecond.", }, []string{sqlInstance}, ) )
View Source
var ( DefaultLatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "go_sql_latency", Help: "The latency of sql calls in milliseconds.", }, []string{sqlInstance, sqlDatabase, sqlMethod, sqlStatus}, ) )
Functions ¶
Types ¶
type Options ¶
type Options struct { // Regiterer is prometheus Registerer, default prometheus.DefaultRegisterer Registerer prometheus.Registerer // Latency histogram, default DefaultLatency Latency *prometheus.HistogramVec }
Options
Click to show internal directories.
Click to hide internal directories.