Documentation ¶
Index ¶
Constants ¶
View Source
const ( LabelSession = "session" LabelDomain = "domain" LabelDDLOwner = "ddl-owner" LabelDDL = "ddl" LabelDDLSyncer = "ddl-syncer" LabelGCWorker = "gcworker" LabelAnalyze = "analyze" LabelBatchRecvLoop = "batch-recv-loop" LabelBatchSendLoop = "batch-send-loop" LableScope = "scope" ScopeGlobal = "global" ScopeSession = "session" )
metrics labels.
View Source
const ( LblUnretryable = "unretryable" LblReachMax = "reach_max" LblOK = "ok" LblError = "error" LblCommit = "commit" LblAbort = "abort" LblRollback = "rollback" LblComRol = "com_rol" LblType = "type" LblDb = "db" LblResult = "result" LblSQLType = "sql_type" LblGeneral = "general" LblInternal = "internal" LblStore = "store" LblAddress = "address" LblGRPCType = "grpc_type" )
Label constants.
Variables ¶
View Source
var ( // LoadSchemaCounter records the counter of load schema. LoadSchemaCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "domain", Name: "load_schema_total", Help: "Counter of load schema", }, []string{LblType}) // LoadSchemaDuration records the duration of load schema. LoadSchemaDuration = prometheus.NewHistogram( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "domain", Name: "load_schema_duration_seconds", Help: "Bucketed histogram of processing time (s) in load schema.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), }) // LoadPrivilegeCounter records the counter of load privilege. LoadPrivilegeCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "domain", Name: "load_privilege_total", Help: "Counter of load privilege", }, []string{LblType}) SchemaValidatorStop = "stop" SchemaValidatorRestart = "restart" SchemaValidatorReset = "reset" SchemaValidatorCacheEmpty = "cache_empty" SchemaValidatorCacheMiss = "cache_miss" )
Metrics for the domain package.
View Source
var ( QueryTotalCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "query_total", Help: "Counter of queries.", }, []string{LblType, LblResult}) CreateSessionCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "create_session_total", Help: "Counter of create session api.", }, []string{LblGRPCType, LblType}) DeleteSessionCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "delete_session_total", Help: "Counter of delete session api.", }, []string{LblGRPCType, LblType}) ExecuteErrorCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "execute_error_total", Help: "Counter of execute errors.", }, []string{LblGRPCType, LblType}) ReadCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "read_op_total", Help: "Counter of read api.", }, []string{LblGRPCType, LblType}) SparseReadCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "sparse_read_op_total", Help: "Counter of sparse-read api.", }, []string{LblGRPCType, LblType}) StreamReadCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "stream_read_op_total", Help: "Counter of stream read api.", }, []string{LblGRPCType, LblType}) MutateCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "mutate_op_total", Help: "Counter of mutate api.", }, []string{LblGRPCType, LblType}) CommitCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "commit_op_total", Help: "Counter of commit api errors.", }, []string{LblGRPCType, LblType}) ExecuteReadDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "execute_read_duration_seconds", Help: "Bucketed histogram of processing time (s) in running read executor.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 22), }, []string{LblGRPCType, LblType}) ExecuteMutateDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "grpc", Name: "execute_mutate_duration_seconds", Help: "Bucketed histogram of processing time (s) in running mutate executor.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 22), }, []string{LblGRPCType, LblType}) )
View Source
var ( SessionRetry = prometheus.NewHistogram( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "session", Name: "retry_num", Help: "Bucketed histogram of session retry count.", Buckets: prometheus.LinearBuckets(0, 1, 20), }) SessionRetryErrorCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "session", Name: "retry_error_total", Help: "Counter of session retry error.", }, []string{LblSQLType, LblType}) SessionCounter = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: "zetta", Subsystem: "session", Name: "session_num", Help: "num of sessions ", }, []string{LblType}) TransactionCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "session", Name: "transaction_total", Help: "Counter of transactions.", }, []string{LblSQLType, LblType}) TransactionDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "session", Name: "transaction_duration_seconds", Help: "Bucketed histogram of a transaction execution duration, including retry.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), }, []string{LblSQLType, LblType}) SchemaLeaseErrorCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "session", Name: "schema_lease_error_total", Help: "Counter of schema lease error", }, []string{LblType}) )
View Source
var ( FetchRowsCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "tables", Name: "fetch_rows_total", Help: "Counter of fetchRows.", }, []string{LblType}) FetchSparseCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "tables", Name: "fetch_sparse_total", Help: "Counter of fetchSparse.", }, []string{LblType}) FetchRowsDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "tables", Name: "fetch_rows_duration_seconds", Help: "Bucketed histogram of processing time (s) in running table read-store.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 22), }, []string{LblType}) FetchSparseDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "tables", Name: "fetch_sparse_duration_seconds", Help: "Bucketed histogram of processing time (s) in running mutate executor.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 22), }, []string{LblType}) BatchSparseCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "tables", Name: "batch_sparse_total", Help: "Counter of batchSparse.", }, []string{LblType}) ScanSparseCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "zetta", Subsystem: "tables", Name: "scan_sparse_total", Help: "Counter of scanSparse.", }, []string{LblType}) BatchSparseDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "tables", Name: "batch_sparse_duration_seconds", Help: "Bucketed histogram of processing time (s) in running mutate executor.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 22), }, []string{LblType}) ScanSparseDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "tables", Name: "scan_sparse_duration_seconds", Help: "Bucketed histogram of processing time (s) in running mutate executor.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 22), }, []string{LblType}) )
View Source
var ( // PanicCounter measures the count of panics. PanicCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "tidb", Subsystem: "server", Name: "panic_total", Help: "Counter of panic.", }, []string{LblType}) )
View Source
var ( TSFutureWaitDuration = prometheus.NewHistogram( prometheus.HistogramOpts{ Namespace: "zetta", Subsystem: "pdclient", Name: "ts_future_wait_seconds", Help: "Bucketed histogram of seconds cost for waiting timestamp future.", Buckets: prometheus.ExponentialBuckets(0.000005, 2, 20), }) )
Metrics for the timestamp oracle.
Functions ¶
func RegisterMetrics ¶
func RegisterMetrics()
RegisterMetrics registers the metrics which are ONLY used in TiDB server.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.