Documentation ¶
Index ¶
Constants ¶
View Source
const ( ResultSuccess = "success" ResultError = "error" )
Variables ¶
View Source
var ( SQLTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "kine_sql_total", Help: "Total number of SQL operations", }, []string{"error_code"}) SQLTime = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Name: "kine_sql_time_seconds", Help: "Length of time per SQL operation", Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30}, }, []string{"error_code"}) CompactTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "kine_compact_total", Help: "Total number of compactions", }, []string{"result"}) )
View Source
var ( // SlowSQLThreshold is a duration which SQL executed longer than will be logged. // This can be directly modified to override the default value when kine is used as a library. SlowSQLThreshold = time.Second )
Functions ¶
func ObserveSQL ¶
Types ¶
type RegistererGatherer ¶
type RegistererGatherer interface { prometheus.Registerer prometheus.Gatherer }
var Registry RegistererGatherer = prometheus.NewRegistry()
Click to show internal directories.
Click to hide internal directories.