v2

package
v1.2.3-hotfix-20240916 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	S3ConnectCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "fs",
			Name:      "s3_connect_total",
			Help:      "Total number of s3 connect count.",
		})

	S3DNSResolveCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "fs",
			Name:      "s3_dns_resolve_total",
			Help:      "Total number of s3 dns resolve count.",
		})

	FSReadS3Counter        = fsReadCounter.WithLabelValues("s3")
	FSReadHitMemCounter    = fsReadCounter.WithLabelValues("hit-mem")
	FSReadHitDiskCounter   = fsReadCounter.WithLabelValues("hit-disk")
	FSReadHitRemoteCounter = fsReadCounter.WithLabelValues("hit-remote")

	FSWriteS3Counter    = fsWriteCounter.WithLabelValues("s3")
	FSWriteLocalCounter = fsWriteCounter.WithLabelValues("local")
)
View Source
var (
	S3WriteIOBytesHistogram = s3IOBytesHistogram.WithLabelValues("write")
	S3ReadIOBytesHistogram  = s3IOBytesHistogram.WithLabelValues("read")

	S3GetConnDurationHistogram      = s3ConnDurationHistogram.WithLabelValues("get-conn")
	S3DNSResolveDurationHistogram   = s3ConnDurationHistogram.WithLabelValues("dns-resolve")
	S3ConnectDurationHistogram      = s3ConnDurationHistogram.WithLabelValues("connect")
	S3TLSHandshakeDurationHistogram = s3ConnDurationHistogram.WithLabelValues("tls-handshake")

	LocalWriteIOBytesHistogram = localIOBytesHistogram.WithLabelValues("write")
	LocalReadIOBytesHistogram  = localIOBytesHistogram.WithLabelValues("read")
)
View Source
var (
	IOMergerCounterInitiate = ioMergerCounter.WithLabelValues("initiate")
	IOMergerCounterWait     = ioMergerCounter.WithLabelValues("wait")

	IOMergerDurationInitiate = ioMergerDuration.WithLabelValues("initiate")
	IOMergerDurationWait     = ioMergerDuration.WithLabelValues("wait")
)
View Source
var (
	FSReadDurationReadVectorCache   = fsReadWriteDuration.WithLabelValues("read-vector-cache")
	FSReadDurationUpdateVectorCache = fsReadWriteDuration.WithLabelValues("update-vector-cache")
	FSReadDurationReadMemoryCache   = fsReadWriteDuration.WithLabelValues("read-memory-cache")
	FSReadDurationUpdateMemoryCache = fsReadWriteDuration.WithLabelValues("update-memory-cache")
	FSReadDurationReadDiskCache     = fsReadWriteDuration.WithLabelValues("read-disk-cache")
	FSReadDurationUpdateDiskCache   = fsReadWriteDuration.WithLabelValues("update-disk-cache")
	FSReadDurationReadRemoteCache   = fsReadWriteDuration.WithLabelValues("read-remote-cache")
	FSReadDurationGetReader         = fsReadWriteDuration.WithLabelValues("get-reader")
	FSReadDurationGetContent        = fsReadWriteDuration.WithLabelValues("get-content")
	FSReadDurationGetEntryData      = fsReadWriteDuration.WithLabelValues("get-entry-data")
	FSReadDurationWriteToWriter     = fsReadWriteDuration.WithLabelValues("write-to-writer")
	FSReadDurationSetCachedData     = fsReadWriteDuration.WithLabelValues("set-cached-data")
	FSReadDurationDiskCacheSetFile  = fsReadWriteDuration.WithLabelValues("disk-cache-set-file")
	FSReadDurationList              = fsReadWriteDuration.WithLabelValues("list")
	FSReadDurationStat              = fsReadWriteDuration.WithLabelValues("stat")
	FSReadDurationIOReadAll         = fsReadWriteDuration.WithLabelValues("io-read-all")

	FSWriteDurationWrite = fsReadWriteDuration.WithLabelValues("write")
)
View Source
var (
	FSMallocLiveObjectsIOEntryData = fsMallocLiveObjects.WithLabelValues("io_entry_data")
	FSMallocLiveObjectsBytes       = fsMallocLiveObjects.WithLabelValues("bytes")
	FSMallocLiveObjectsMemoryCache = fsMallocLiveObjects.WithLabelValues("memory_cache")
)
View Source
var (
	CreatedDurationHistogram          = acceptConnDurationHistogram.WithLabelValues("created")
	EstablishDurationHistogram        = acceptConnDurationHistogram.WithLabelValues("establish")
	UpgradeTLSDurationHistogram       = acceptConnDurationHistogram.WithLabelValues("upgradeTLS")
	AuthenticateDurationHistogram     = acceptConnDurationHistogram.WithLabelValues("authenticate")
	SendErrPacketDurationHistogram    = acceptConnDurationHistogram.WithLabelValues("send-err-packet")
	SendOKPacketDurationHistogram     = acceptConnDurationHistogram.WithLabelValues("send-ok-packet")
	CheckTenantDurationHistogram      = acceptConnDurationHistogram.WithLabelValues("check-tenant")
	CheckUserDurationHistogram        = acceptConnDurationHistogram.WithLabelValues("check-user")
	CheckRoleDurationHistogram        = acceptConnDurationHistogram.WithLabelValues("check-role")
	CheckDbNameDurationHistogram      = acceptConnDurationHistogram.WithLabelValues("check-dbname")
	InitGlobalSysVarDurationHistogram = acceptConnDurationHistogram.WithLabelValues("init-global-sys-var")

	CreatedRoutineCounter = routineCounter.WithLabelValues("created")
	CloseRoutineCounter   = routineCounter.WithLabelValues("close")

	StartHandleRequestCounter = requestCounter.WithLabelValues("start-handle")
	EndHandleRequestCounter   = requestCounter.WithLabelValues("end-handle")

	TotalResolveDurationHistogram   = resolveDurationHistogram.WithLabelValues("total-resolve")
	EnsureDatabaseDurationHistogram = resolveDurationHistogram.WithLabelValues("ensure-database")
	GetSubMetaDurationHistogram     = resolveDurationHistogram.WithLabelValues("get-sub-meta")
	CheckSubValidDurationHistogram  = resolveDurationHistogram.WithLabelValues("check-sub-valid")
	GetRelationDurationHistogram    = resolveDurationHistogram.WithLabelValues("get-relation")
	OpenDBDurationHistogram         = resolveDurationHistogram.WithLabelValues("open-db")
	OpenTableDurationHistogram      = resolveDurationHistogram.WithLabelValues("open-table")
	GetTmpTableDurationHistogram    = resolveDurationHistogram.WithLabelValues("get-tmp-table")

	TotalCreateDurationHistogram              = createAccountDurationHistogram.WithLabelValues("total-create")
	Step1DurationHistogram                    = createAccountDurationHistogram.WithLabelValues("step1")
	Step2DurationHistogram                    = createAccountDurationHistogram.WithLabelValues("step2")
	CreateTablesInMoCatalogDurationHistogram  = createAccountDurationHistogram.WithLabelValues("create-tables-in-mo-catalog")
	ExecDDL1DurationHistogram                 = createAccountDurationHistogram.WithLabelValues("exec-ddl1")
	InitData1DurationHistogram                = createAccountDurationHistogram.WithLabelValues("init-data1")
	CreateTablesInSystemDurationHistogram     = createAccountDurationHistogram.WithLabelValues("create-tables-in-system")
	CreateTablesInInfoSchemaDurationHistogram = createAccountDurationHistogram.WithLabelValues("create-tables-in-info-schema")

	TotalSQLLengthHistogram          = sqlLengthHistogram.WithLabelValues("total-sql-length")
	LoadDataInlineSQLLengthHistogram = sqlLengthHistogram.WithLabelValues("load-data-inline-sql-length")
	OtherSQLLengthHistogram          = sqlLengthHistogram.WithLabelValues("other-sql-length")
)
View Source
var (
	HeartbeatHistogram = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "hakeeper",
			Subsystem: "heartbeat_send",
			Name:      "duration_seconds",
			Help:      "hakeeper heartbeat send durations",
			Buckets:   getDurationBuckets(),
		}, []string{"type"})

	HeartbeatFailureCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "hakeeper",
			Subsystem: "heartbeat_send",
			Name:      "failed_total",
			Help:      "hakeeper heartbeat failed count",
		}, []string{"type"})

	HeartbeatRecvHistogram = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "hakeeper",
			Subsystem: "heartbeat_recv",
			Name:      "duration_seconds",
			Help:      "hakeeper heartbeat recv durations",
			Buckets:   getDurationBuckets(),
		}, []string{"type"})

	HeartbeatRecvFailureCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "hakeeper",
			Subsystem: "heartbeat_recv",
			Name:      "failed_total",
			Help:      "hakeeper heartbeat recv failed count",
		}, []string{"type"})

	CNHeartbeatHistogram          = HeartbeatHistogram.WithLabelValues("cn")
	CNHeartbeatFailureCounter     = HeartbeatFailureCounter.WithLabelValues("cn")
	CNHeartbeatRecvHistogram      = HeartbeatRecvHistogram.WithLabelValues("cn")
	CNHeartbeatRecvFailureCounter = HeartbeatRecvFailureCounter.WithLabelValues("cn")

	TNHeartbeatHistogram          = HeartbeatHistogram.WithLabelValues("tn")
	TNHeartbeatFailureCounter     = HeartbeatFailureCounter.WithLabelValues("tn")
	TNHeartbeatRecvHistogram      = HeartbeatRecvHistogram.WithLabelValues("tn")
	TNHeartbeatRecvFailureCounter = HeartbeatRecvFailureCounter.WithLabelValues("tn")

	LogHeartbeatHistogram          = HeartbeatHistogram.WithLabelValues("log")
	LogHeartbeatFailureCounter     = HeartbeatFailureCounter.WithLabelValues("log")
	LogHeartbeatRecvHistogram      = HeartbeatRecvHistogram.WithLabelValues("log")
	LogHeartbeatRecvFailureCounter = HeartbeatRecvFailureCounter.WithLabelValues("log")
)
View Source
var (
	LogtailLoadCheckpointCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "load_checkpoint_total",
			Help:      "Total number of load checkpoint handled.",
		})

	LogtailTotalReceivedCounter       = logtailReceivedCounter.WithLabelValues("total")
	LogtailSubscribeReceivedCounter   = logtailReceivedCounter.WithLabelValues("subscribe")
	LogtailUnsubscribeReceivedCounter = logtailReceivedCounter.WithLabelValues("unsubscribe")
	LogtailUpdateReceivedCounter      = logtailReceivedCounter.WithLabelValues("update")
	LogtailHeartbeatReceivedCounter   = logtailReceivedCounter.WithLabelValues("heartbeat")
)
View Source
var (
	LogTailSendQueueSizeGauge    = logTailQueueSizeGauge.WithLabelValues("send")
	LogTailReceiveQueueSizeGauge = logTailQueueSizeGauge.WithLabelValues("receive")
	LogTailApplyQueueSizeGauge   = logTailQueueSizeGauge.WithLabelValues("apply")
)
View Source
var (
	LogTailBytesHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "bytes",
			Help:      "Bucketed histogram of logtail log bytes.",
			Buckets:   prometheus.ExponentialBuckets(1, 2.0, 10),
		})

	LogTailApplyDurationHistogram              = logTailApplyDurationHistogram.WithLabelValues("apply")
	LogTailApplyLatencyDurationHistogram       = logTailApplyDurationHistogram.WithLabelValues("apply-latency")
	LogTailApplyNotifyDurationHistogram        = logTailApplyDurationHistogram.WithLabelValues("apply-notify")
	LogTailApplyNotifyLatencyDurationHistogram = logTailApplyDurationHistogram.WithLabelValues("apply-notify-latency")

	LogtailUpdatePartitonEnqueueGlobalStatsDurationHistogram                       = logtailUpdatePartitionDurationHistogram.WithLabelValues("enqueue-global-stats")
	LogtailUpdatePartitonGetPartitionDurationHistogram                             = logtailUpdatePartitionDurationHistogram.WithLabelValues("get-partition")
	LogtailUpdatePartitonGetLockDurationHistogram                                  = logtailUpdatePartitionDurationHistogram.WithLabelValues("get-lock")
	LogtailUpdatePartitonGetCatalogDurationHistogram                               = logtailUpdatePartitionDurationHistogram.WithLabelValues("get-catalog")
	LogtailUpdatePartitonHandleCheckpointDurationHistogram                         = logtailUpdatePartitionDurationHistogram.WithLabelValues("handle-checkpoint")
	LogtailUpdatePartitonConsumeLogtailDurationHistogram                           = logtailUpdatePartitionDurationHistogram.WithLabelValues("consume")
	LogtailUpdatePartitonConsumeLogtailCatalogTableDurationHistogram               = logtailUpdatePartitionDurationHistogram.WithLabelValues("consume-catalog-table")
	LogtailUpdatePartitonConsumeLogtailCommandsDurationHistogram                   = logtailUpdatePartitionDurationHistogram.WithLabelValues("consume-commands")
	LogtailUpdatePartitonConsumeLogtailOneEntryDurationHistogram                   = logtailUpdatePartitionDurationHistogram.WithLabelValues("consume-one-entry")
	LogtailUpdatePartitonConsumeLogtailOneEntryLogtailReplayDurationHistogram      = logtailUpdatePartitionDurationHistogram.WithLabelValues("consume-one-entry-logtailreplay")
	LogtailUpdatePartitonConsumeLogtailOneEntryUpdateCatalogCacheDurationHistogram = logtailUpdatePartitionDurationHistogram.WithLabelValues("consume-one-entry-catalog-cache")
	LogtailUpdatePartitonUpdateTimestampsDurationHistogram                         = logtailUpdatePartitionDurationHistogram.WithLabelValues("update-timestamps")

	LogTailAppendDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "append_duration_seconds",
			Help:      "Bucketed histogram of append log tail into logservice duration.",
			Buckets:   getDurationBuckets(),
		})

	LogtailSendTotalHistogram   = logTailSendDurationHistogram.WithLabelValues("total")
	LogtailSendLatencyHistogram = logTailSendDurationHistogram.WithLabelValues("latency")
	LogtailSendNetworkHistogram = logTailSendDurationHistogram.WithLabelValues("network")

	LogtailPullScanTxnCountHistogram = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "pull_scan_txn_count",
			Help:      "Bucketed histogram of pull scan txn count.",
			Buckets:   prometheus.ExponentialBuckets(1, 3.0, 20),
		}, []string{"type"})

	LogTailPullScanSkipBlkCountHistogram = LogtailPullScanTxnCountHistogram.WithLabelValues("skip-blk")
	LogTailPullScanScanRowCountHistogram = LogtailPullScanTxnCountHistogram.WithLabelValues("scan-row")

	LogTailLoadCheckpointDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "load_checkpoint_duration_seconds",
			Help:      "Bucketed histogram of load check point duration.",
			Buckets:   getDurationBuckets(),
		})

	LogTailPullCollectionPhase1DurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "pull_collection_phase1_duration_seconds",
			Help:      "Bucketed histogram of logtail pull type collection duration of phase1.",
			Buckets:   getDurationBuckets(),
		})

	LogTailPullCollectionPhase2DurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "pull_collection_phase2_duration_seconds",
			Help:      "Bucketed histogram of logtail pull type collection duration of phase2.",
			Buckets:   getDurationBuckets(),
		})

	LogTailPushCollectionDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "push_collection_duration_seconds",
			Help:      "Bucketed histogram of logtail push type collection duration.",
			Buckets:   getDurationBuckets(),
		})

	LogTailServerSendCounter    = logTailTransmitCounter.WithLabelValues("server-send")
	LogTailClientReceiveCounter = logTailTransmitCounter.WithLabelValues("client-receive")
)
View Source
var (
	MemTAEDefaultAllocatorGauge           = memMPoolAllocatedSizeGauge.WithLabelValues("tae_default")
	MemTAEMutableAllocatorGauge           = memMPoolAllocatedSizeGauge.WithLabelValues("tae_mutable")
	MemTAESmallAllocatorGauge             = memMPoolAllocatedSizeGauge.WithLabelValues("tae_small")
	MemTAEVectorPoolDefaultAllocatorGauge = memMPoolAllocatedSizeGauge.WithLabelValues("vectorpool_default")
	MemTAELogtailAllocatorGauge           = memMPoolAllocatedSizeGauge.WithLabelValues("tae_logtail")
	MemTAECheckpointAllocatorGauge        = memMPoolAllocatedSizeGauge.WithLabelValues("tae_checkpoint")
	MemTAEMergeAllocatorGauge             = memMPoolAllocatedSizeGauge.WithLabelValues("tae_merge")
	MemTAEWorkSpaceAllocatorGauge         = memMPoolAllocatedSizeGauge.WithLabelValues("tae_workspace")
	MemTAEDebugAllocatorGauge             = memMPoolAllocatedSizeGauge.WithLabelValues("tae_debug")
	MemGlobalStatsAllocatedGauge          = memMPoolAllocatedSizeGauge.WithLabelValues("global_stats_allocated")

	MemTAEDefaultHighWaterMarkGauge           = memMPoolHighWaterMarkGauge.WithLabelValues("tae_default_high_water_mark")
	MemTAEMutableHighWaterMarkGauge           = memMPoolHighWaterMarkGauge.WithLabelValues("tae_mutable_high_water_mark")
	MemTAESmallHighWaterMarkGauge             = memMPoolHighWaterMarkGauge.WithLabelValues("tae_small_high_water_mark")
	MemTAEVectorPoolDefaultHighWaterMarkGauge = memMPoolHighWaterMarkGauge.WithLabelValues("vectorpool_default_high_water_mark")
	MemTAELogtailHighWaterMarkGauge           = memMPoolHighWaterMarkGauge.WithLabelValues("tae_logtail_high_water_mark")
	MemTAECheckpointHighWaterMarkGauge        = memMPoolHighWaterMarkGauge.WithLabelValues("tae_checkpoint_high_water_mark")
	MemTAEMergeHighWaterMarkGauge             = memMPoolHighWaterMarkGauge.WithLabelValues("tae_merge_high_water_mark")
	MemTAEWorkSpaceHighWaterMarkGauge         = memMPoolHighWaterMarkGauge.WithLabelValues("tae_workspace_high_water_mark")
	MemTAEDebugHighWaterMarkGauge             = memMPoolHighWaterMarkGauge.WithLabelValues("tae_debug_high_water_mark")
	MemGlobalStatsHighWaterMarkGauge          = memMPoolHighWaterMarkGauge.WithLabelValues("global_stats_allocated_high_water_mark")
)
View Source
var (

	// all
	MallocCounterAllocateBytes   = mallocCounter.WithLabelValues("allocate")
	MallocCounterAllocateObjects = mallocCounter.WithLabelValues("allocate-objects")
	MallocGaugeInuseBytes        = mallocGauge.WithLabelValues("inuse")
	MallocGaugeInuseObjects      = mallocGauge.WithLabelValues("inuse-objects")

	// memory cache
	MallocCounterMemoryCacheAllocateBytes   = mallocCounter.WithLabelValues("memory-cache-allocate")
	MallocCounterMemoryCacheAllocateObjects = mallocCounter.WithLabelValues("memory-cache-allocate-objects")
	MallocGaugeMemoryCacheInuseBytes        = mallocGauge.WithLabelValues("memory-cache-inuse")
	MallocGaugeMemoryCacheInuseObjects      = mallocGauge.WithLabelValues("memory-cache-inuse-objects")

	// io
	MallocCounterIOAllocateBytes   = mallocCounter.WithLabelValues("io-allocate")
	MallocCounterIOAllocateObjects = mallocCounter.WithLabelValues("io-allocate-objects")
	MallocGaugeIOInuseBytes        = mallocGauge.WithLabelValues("io-inuse")
	MallocGaugeIOInuseObjects      = mallocGauge.WithLabelValues("io-inuse-objects")

	// bytes
	MallocCounterBytesAllocateBytes   = mallocCounter.WithLabelValues("bytes-allocate")
	MallocCounterBytesAllocateObjects = mallocCounter.WithLabelValues("bytes-allocate-objects")
	MallocGaugeBytesInuseBytes        = mallocGauge.WithLabelValues("bytes-inuse")
	MallocGaugeBytesInuseObjects      = mallocGauge.WithLabelValues("bytes-inuse-objects")

	// session
	MallocCounterSessionAllocateBytes   = mallocCounter.WithLabelValues("session-allocate")
	MallocCounterSessionAllocateObjects = mallocCounter.WithLabelValues("session-allocate-objects")
	MallocGaugeSessionInuseBytes        = mallocGauge.WithLabelValues("session-inuse")
	MallocGaugeSessionInuseObjects      = mallocGauge.WithLabelValues("session-inuse-objects")
)
View Source
var (
	PipelineServerDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "pipeline",
			Name:      "server_duration_seconds",
			Help:      "Bucketed histogram of server processing duration seconds of pipeline.",
			Buckets:   getDurationBuckets(),
		})

	PipelineMessageSenderCounter = pipelineStreamCounter.WithLabelValues("living")
)
View Source
var (
	ProxyConnectAcceptedCounter   = proxyConnectCounter.WithLabelValues("accepted")
	ProxyConnectCurrentCounter    = proxyConnectCounter.WithLabelValues("current")
	ProxyConnectSuccessCounter    = proxyConnectCounter.WithLabelValues("success")
	ProxyConnectRouteFailCounter  = proxyConnectCounter.WithLabelValues("route-fail")
	ProxyConnectCommonFailCounter = proxyConnectCounter.WithLabelValues("common-fail")
	ProxyConnectRetryCounter      = proxyConnectCounter.WithLabelValues("retry")
	ProxyConnectSelectCounter     = proxyConnectCounter.WithLabelValues("select")
	ProxyConnectRejectCounter     = proxyConnectCounter.WithLabelValues("reject")

	ProxyServerDisconnectCounter = proxyDisconnectCounter.WithLabelValues("server")
	ProxyClientDisconnectCounter = proxyDisconnectCounter.WithLabelValues("client")

	ProxyTransferSuccessCounter = proxyTransferCounter.WithLabelValues("success")
	ProxyTransferFailCounter    = proxyTransferCounter.WithLabelValues("fail")
	ProxyTransferAbortCounter   = proxyTransferCounter.WithLabelValues("abort")

	ProxyTransferDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "proxy",
			Name:      "connection_transfer_duration",
			Help:      "Histogram of proxy transfer connections duration",
			Buckets:   prometheus.ExponentialBuckets(0.00001, 2.0, 20),
		})

	ProxyDrainCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "proxy",
			Name:      "drain_counter",
			Help:      "Count of proxy drain CN servers",
		})

	ProxyAvailableBackendServerNumGauge = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "mo",
			Subsystem: "proxy",
			Name:      "available_backend_server_num",
			Help:      "Count of available backend servers",
		}, []string{"account"})

	ProxyTransferQueueSizeGauge = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "mo",
			Subsystem: "proxy",
			Name:      "transfer_queue_size",
			Help:      "Size of proxy transfer queue",
		})

	ProxyConnectionsNeedToTransferGauge = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "mo",
			Subsystem: "proxy",
			Name:      "connections_need_to_transfer",
			Help:      "Proxy connections need to transfer",
		})

	ProxyConnectionsTransferIntentGauge = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "mo",
			Subsystem: "proxy",
			Name:      "connections_transfer_intent",
			Help:      "Proxy connections in transfer intent state",
		})
)
View Source
var (
	StatsTriggerForcedCounter   = statsTriggerCounter.WithLabelValues("forced")
	StatsTriggerUnforcedCounter = statsTriggerCounter.WithLabelValues("unforced")

	StatsUpdateBlockCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "stats",
			Name:      "update_block_count",
			Help:      "Total number of stats update block count.",
		})
)
View Source
var (
	TaskFlushTableTailDurationHistogram     = taskShortDurationHistogram.WithLabelValues("flush_table_tail")
	TaskCommitTableTailDurationHistogram    = taskShortDurationHistogram.WithLabelValues("commit_table_tail")
	TaskCommitMergeObjectsDurationHistogram = taskShortDurationHistogram.WithLabelValues("commit_merge_objects")
	GetObjectStatsDurationHistogram         = taskShortDurationHistogram.WithLabelValues("get_object_stats")

	// storage usage / show accounts metrics
	TaskGCkpCollectUsageDurationHistogram          = taskShortDurationHistogram.WithLabelValues("gckp_collect_usage")
	TaskICkpCollectUsageDurationHistogram          = taskShortDurationHistogram.WithLabelValues("ickp_collect_usage")
	TaskStorageUsageReqDurationHistogram           = taskShortDurationHistogram.WithLabelValues("handle_usage_request")
	TaskShowAccountsGetTableStatsDurationHistogram = taskShortDurationHistogram.WithLabelValues("show_accounts_get_table_stats")
	TaskShowAccountsGetUsageDurationHistogram      = taskShortDurationHistogram.WithLabelValues("show_accounts_get_storage_usage")
	TaskShowAccountsTotalDurationHistogram         = taskShortDurationHistogram.WithLabelValues("show_accounts_total_duration")

	TaskCkpEntryPendingDurationHistogram = taskLongDurationHistogram.WithLabelValues("ckp_entry_pending")
	TaskLoadMemDeletesPerBlockHistogram  = taskCountHistogram.WithLabelValues("load_mem_deletes_per_block")
	TaskFlushDeletesCountHistogram       = taskCountHistogram.WithLabelValues("flush_deletes_count")
	TaskFlushDeletesSizeHistogram        = taskBytesHistogram.WithLabelValues("flush_deletes_size")
)
View Source
var (
	TaskDNMergeScheduledByCounter = taskScheduledByCounter.WithLabelValues("merge", "dn")
	TaskCNMergeScheduledByCounter = taskScheduledByCounter.WithLabelValues("merge", "cn")

	TaskDNMergedSizeCounter = taskGeneratedStuffCounter.WithLabelValues("merged_size", "dn")
	TaskCNMergedSizeCounter = taskGeneratedStuffCounter.WithLabelValues("merged_size", "cn")

	TaskSelReadFilterTotal = taskSelectivityCounter.WithLabelValues("readfilter_total")
	TaskSelReadFilterHit   = taskSelectivityCounter.WithLabelValues("readfilter_hit")
	TaskSelBlockTotal      = taskSelectivityCounter.WithLabelValues("block_total")
	TaskSelBlockHit        = taskSelectivityCounter.WithLabelValues("block_hit")
	TaskSelColumnTotal     = taskSelectivityCounter.WithLabelValues("column_total")
	TaskSelColumnHit       = taskSelectivityCounter.WithLabelValues("column_hit")
)
View Source
var (
	TaskMergeTransferPageLengthGauge = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "mo",
			Subsystem: "task",
			Name:      "merge_transfer_page_size",
			Help:      "Size of merge generated transfer page",
		})

	TaskStorageUsageCacheMemUsedGauge = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "mo",
			Subsystem: "task",
			Name:      "storage_usage_cache_size",
			Help:      "Size of the storage usage cache used",
		})
)
View Source
var (
	TraceCollectorCollectDurationHistogram              = traceCollectorDurationHistogram.WithLabelValues("collect")
	TraceCollectorGenerateAwareDurationHistogram        = traceCollectorDurationHistogram.WithLabelValues("generate_awake")
	TraceCollectorGenerateAwareDiscardDurationHistogram = traceCollectorDurationHistogram.WithLabelValues("generate_awake_discard")
	TraceCollectorGenerateDelayDurationHistogram        = traceCollectorDurationHistogram.WithLabelValues("generate_delay")
	TraceCollectorGenerateDurationHistogram             = traceCollectorDurationHistogram.WithLabelValues("generate")
	TraceCollectorGenerateDiscardDurationHistogram      = traceCollectorDurationHistogram.WithLabelValues("generate_discard")
	TraceCollectorExportDurationHistogram               = traceCollectorDurationHistogram.WithLabelValues("export")
)
View Source
var (
	TxnUserCounter           = txnCounter.WithLabelValues("user")
	TxnInternalCounter       = txnCounter.WithLabelValues("internal")
	TxnLeakCounter           = txnCounter.WithLabelValues("leak")
	TxnLongRunningCounter    = txnCounter.WithLabelValues("long running")
	TxnInCommitCounter       = txnCounter.WithLabelValues("stuck in commit")
	TxnInRollbackCounter     = txnCounter.WithLabelValues("stuck in rollback")
	TxnInIncrStmtCounter     = txnCounter.WithLabelValues("stuck in incr statement")
	TxnInRollbackStmtCounter = txnCounter.WithLabelValues("stuck in rollback statement")

	TxnStatementTotalCounter = txnStatementCounter.WithLabelValues("total")
	TxnStatementRetryCounter = txnStatementCounter.WithLabelValues("retry")

	TxnCNCommitCounter        = txnCommitCounter.WithLabelValues("cn")
	TxnTNReceiveCommitCounter = txnCommitCounter.WithLabelValues("tn-receive")
	TxnTNCommitHandledCounter = txnCommitCounter.WithLabelValues("tn-handle")

	TxnRollbackCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "rollback_total",
			Help:      "Total number of txn rollback handled.",
		})

	TxnLockTotalCounter       = txnLockCounter.WithLabelValues("total")
	TxnLocalLockTotalCounter  = txnLockCounter.WithLabelValues("local")
	TxnRemoteLockTotalCounter = txnLockCounter.WithLabelValues("remote")
)
View Source
var (
	TxnCommitQueueSizeGauge     = txnQueueSizeGauge.WithLabelValues("commit")
	TxnWaitActiveQueueSizeGauge = txnQueueSizeGauge.WithLabelValues("wait-active")
	TxnActiveQueueSizeGauge     = txnQueueSizeGauge.WithLabelValues("active")
	TxnLockRPCQueueSizeGauge    = txnQueueSizeGauge.WithLabelValues("lock-rpc")

	TxnCNCommittedMetaLocationQuantityGauge  = txnCNCommittedLocationQuantityGauge.WithLabelValues("meta_location")
	TxnCNCommittedDeltaLocationQuantityGauge = txnCNCommittedLocationQuantityGauge.WithLabelValues("delta_location")
)
View Source
var (
	TxnCNCommitDurationHistogram            = txnCommitDurationHistogram.WithLabelValues("cn")
	TxnCNSendCommitDurationHistogram        = txnCommitDurationHistogram.WithLabelValues("cn-send")
	TxnCNCommitResponseDurationHistogram    = txnCommitDurationHistogram.WithLabelValues("cn-resp")
	TxnCNCommitWaitLogtailDurationHistogram = txnCommitDurationHistogram.WithLabelValues("cn-wait-logtail")
	TxnTNCommitDurationHistogram            = txnCommitDurationHistogram.WithLabelValues("tn")

	TxnLifeCycleDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "life_duration_seconds",
			Help:      "Bucketed histogram of txn life cycle duration.",
			Buckets:   getDurationBuckets(),
		})

	TxnLifeCycleStatementsTotalHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "life_statements_total",
			Help:      "Bucketed histogram of statement total in a txn.",
			Buckets:   prometheus.ExponentialBuckets(1, 2.0, 10),
		})

	TxnUnlockTableTotalHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "unlock_table_total",
			Help:      "Size of txn unlock tables count.",
			Buckets:   prometheus.ExponentialBuckets(1, 2.0, 4),
		})

	TxnCreateTotalDurationHistogram       = txnCreateDurationHistogram.WithLabelValues("total")
	TxnDetermineSnapshotDurationHistogram = txnCreateDurationHistogram.WithLabelValues("determine-snapshot")
	TxnWaitActiveDurationHistogram        = txnCreateDurationHistogram.WithLabelValues("wait-active")

	TxnStatementBuildPlanDurationHistogram      = txnStatementDurationHistogram.WithLabelValues("build-plan")
	TxnStatementExecuteDurationHistogram        = txnStatementDurationHistogram.WithLabelValues("execute")
	TxnStatementExecuteLatencyDurationHistogram = txnStatementDurationHistogram.WithLabelValues("execute-latency")
	TxnStatementCompileDurationHistogram        = txnStatementDurationHistogram.WithLabelValues("compile")
	TxnStatementScanDurationHistogram           = txnStatementDurationHistogram.WithLabelValues("scan")
	TxnStatementExternalScanDurationHistogram   = txnStatementDurationHistogram.WithLabelValues("external-scan")
	TxnStatementInsertS3DurationHistogram       = txnStatementDurationHistogram.WithLabelValues("insert-s3")
	TxnStatementStatsDurationHistogram          = txnStatementDurationHistogram.WithLabelValues("stats")
	TxnStatementResolveDurationHistogram        = txnStatementDurationHistogram.WithLabelValues("resolve")
	TxnStatementResolveUdfDurationHistogram     = txnStatementDurationHistogram.WithLabelValues("resolve-udf")
	TxnStatementUpdateStatsDurationHistogram    = txnStatementDurationHistogram.WithLabelValues("update-stats")
	TxnStatementUpdateInfoFromZonemapHistogram  = txnStatementDurationHistogram.WithLabelValues("update-info-from-zonemap")
	TxnStatementUpdateStatsInfoMapHistogram     = txnStatementDurationHistogram.WithLabelValues("update-stats-info-map")
	TxnStatementNodesHistogram                  = txnStatementDurationHistogram.WithLabelValues("nodes")
	TxnStatementCompileScopeHistogram           = txnStatementDurationHistogram.WithLabelValues("compileScope")
	TxnStatementCompileQueryHistogram           = txnStatementDurationHistogram.WithLabelValues("compileQuery")
	TxnStatementCompilePlanScopeHistogram       = txnStatementDurationHistogram.WithLabelValues("compilePlanScope")
	TxnStatementBuildPlanHistogram              = txnStatementDurationHistogram.WithLabelValues("BuildPlan")
	TxnStatementBuildSelectHistogram            = txnStatementDurationHistogram.WithLabelValues("BuildSelect")
	TxnStatementBuildInsertHistogram            = txnStatementDurationHistogram.WithLabelValues("BuildInsert")
	TxnStatementBuildExplainHistogram           = txnStatementDurationHistogram.WithLabelValues("BuildExplain")
	TxnStatementBuildReplaceHistogram           = txnStatementDurationHistogram.WithLabelValues("BuildReplace")
	TxnStatementBuildUpdateHistogram            = txnStatementDurationHistogram.WithLabelValues("BuildUpdate")
	TxnStatementBuildDeleteHistogram            = txnStatementDurationHistogram.WithLabelValues("BuildDelete")
	TxnStatementBuildLoadHistogram              = txnStatementDurationHistogram.WithLabelValues("BuildLoad")

	TxnAcquireLockDurationHistogram     = txnLockDurationHistogram.WithLabelValues("acquire")
	TxnAcquireLockWaitDurationHistogram = txnLockDurationHistogram.WithLabelValues("acquire-wait")
	TxnHoldLockDurationHistogram        = txnLockDurationHistogram.WithLabelValues("hold")

	TxnUnlockDurationHistogram             = txnUnlockDurationHistogram.WithLabelValues("total")
	TxnUnlockBtreeGetLockDurationHistogram = txnUnlockDurationHistogram.WithLabelValues("btree-get-lock")
	TxnUnlockBtreeTotalDurationHistogram   = txnUnlockDurationHistogram.WithLabelValues("btree-total")
	TxnLockWorkerHandleDurationHistogram   = txnUnlockDurationHistogram.WithLabelValues("worker-handle")

	TxnLockWaitersTotalHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "lock_waiters_total",
			Help:      "Bucketed histogram of waiters count in one lock.",
			Buckets:   prometheus.ExponentialBuckets(1, 2.0, 10),
		})

	TxnTableRangeDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "ranges_duration_seconds",
			Help:      "Bucketed histogram of txn table ranges duration.",
			Buckets:   getDurationBuckets(),
		})

	TxnCheckPKDupDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "check_pk_dup_duration_seconds",
			Help:      "Bucketed histogram of txn check pk dup duration.",
			Buckets:   getDurationBuckets(),
		})

	TxnRangesSlowPathSelectedBlockCntHistogram = txnTableRangeTotalHistogram.WithLabelValues("slow_path_selected_block_cnt")
	TxnRangesFastPathSelectedBlockCntHistogram = txnTableRangeTotalHistogram.WithLabelValues("fast_path_selected_block_cnt")
	TxnRangesFastPathLoadObjCntHistogram       = txnTableRangeTotalHistogram.WithLabelValues("fast_path_load_obj_cnt")
	TxnRangesSlowPathLoadObjCntHistogram       = txnTableRangeTotalHistogram.WithLabelValues("slow_path_load_obj_cnt")

	TxnPreparingWaitDurationHistogram  = txnTNSideDurationHistogram.WithLabelValues("1-PreparingWait")
	TxnPreparingDurationHistogram      = txnTNSideDurationHistogram.WithLabelValues("2-Preparing")
	TxnPrepareWalWaitDurationHistogram = txnTNSideDurationHistogram.WithLabelValues("3-PrepareWalWait")
	TxnPrepareWalDurationHistogram     = txnTNSideDurationHistogram.WithLabelValues("4-PrepareWal")
	TxnPreparedWaitDurationHistogram   = txnTNSideDurationHistogram.WithLabelValues("5-PreparedWait")
	TxnPreparedDurationHistogram       = txnTNSideDurationHistogram.WithLabelValues("6-Prepared")

	TxnBeforeCommitDurationHistogram = txnTNSideDurationHistogram.WithLabelValues("before_txn_commit")

	TxnTNAppendDeduplicateDurationHistogram     = txnTNDeduplicateDurationHistogram.WithLabelValues("append_deduplicate")
	TxnTNPrePrepareDeduplicateDurationHistogram = txnTNDeduplicateDurationHistogram.WithLabelValues("prePrepare_deduplicate")

	TxnMpoolNewDurationHistogram    = txnMpoolDurationHistogram.WithLabelValues("new")
	TxnMpoolDeleteDurationHistogram = txnMpoolDurationHistogram.WithLabelValues("delete")

	TxnBlockReaderDurationHistogram      = txnReaderDurationHistogram.WithLabelValues("block-reader")
	TxnMergeReaderDurationHistogram      = txnReaderDurationHistogram.WithLabelValues("merge-reader")
	TxnBlockMergeReaderDurationHistogram = txnReaderDurationHistogram.WithLabelValues("block-merge-reader")

	TxnRangesSlowPathBlockSelectivityHistogram          = txnRangesSelectivityHistogram.WithLabelValues("slow_path_block_selectivity")
	TxnRangesFastPathBlkTotalSelectivityHistogram       = txnRangesSelectivityHistogram.WithLabelValues("fast_path_block_selectivity")
	TxnRangesFastPathObjSortKeyZMapSelectivityHistogram = txnRangesSelectivityHistogram.WithLabelValues("fast_path_obj_sort_key_zm_selectivity")
	TxnRangesFastPathObjColumnZMapSelectivityHistogram  = txnRangesSelectivityHistogram.WithLabelValues("fast_path_obj_column_zm_selectivity")
	TxnRangesFastPathBlkColumnZMapSelectivityHistogram  = txnRangesSelectivityHistogram.WithLabelValues("fast_path_blk_column_zm_selectivity")
)
View Source
var (
	LogTailSubscriptionCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "subscription_request_total",
			Help:      "Total numbers of logtail subscription the tn have received.",
		})
)
View Source
var (
	MemTotalCrossPoolFreeCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "mem",
			Name:      "cross_pool_free_total",
			Help:      "Total number of cross pool free",
		})
)
View Source
var (
	RPCClientCreateCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "rpc",
			Name:      "client_create_total",
			Help:      "Total number of morpc client created.",
		}, []string{"name"})
)

Functions

func GetPrometheusGatherer added in v1.0.1

func GetPrometheusGatherer() prometheus.Gatherer

func GetPrometheusRegistry added in v1.0.1

func GetPrometheusRegistry() prometheus.Registerer

func GetTraceNegativeCUCounter added in v1.1.2

func GetTraceNegativeCUCounter(typ string) prometheus.Counter

func NewRPCBackendCloseCounterByName

func NewRPCBackendCloseCounterByName(name string) prometheus.Counter

func NewRPCBackendConnectCounterByName

func NewRPCBackendConnectCounterByName(name string) prometheus.Counter

func NewRPCBackendConnectDurationHistogramByName

func NewRPCBackendConnectDurationHistogramByName(name string) prometheus.Observer

func NewRPCBackendConnectFailedCounterByName

func NewRPCBackendConnectFailedCounterByName(name string) prometheus.Counter

func NewRPCBackendCreateCounterByName

func NewRPCBackendCreateCounterByName(name string) prometheus.Counter

func NewRPCBackendDoneDurationHistogramByName

func NewRPCBackendDoneDurationHistogramByName(name string) prometheus.Observer

func NewRPCBackendPoolSizeGaugeByName

func NewRPCBackendPoolSizeGaugeByName(name string) prometheus.Gauge

func NewRPCBackendSendingBatchSizeGaugeByName

func NewRPCBackendSendingBatchSizeGaugeByName(name string) prometheus.Gauge

func NewRPCBackendSendingQueueSizeGaugeByName

func NewRPCBackendSendingQueueSizeGaugeByName(name string) prometheus.Gauge

func NewRPCBackendWriteDurationHistogramByName

func NewRPCBackendWriteDurationHistogramByName(name string) prometheus.Observer

func NewRPCBackendWriteLatencyDurationHistogramByName

func NewRPCBackendWriteLatencyDurationHistogramByName(name string) prometheus.Observer

func NewRPCInputCounter added in v1.1.0

func NewRPCInputCounter() prometheus.Counter

func NewRPCMessageReceiveCounterByName

func NewRPCMessageReceiveCounterByName(name string) prometheus.Counter

func NewRPCMessageSendCounterByName

func NewRPCMessageSendCounterByName(name string) prometheus.Counter

func NewRPCOutputCounter added in v1.1.0

func NewRPCOutputCounter() prometheus.Counter

func NewRPCServerSendingBatchSizeGaugeByName

func NewRPCServerSendingBatchSizeGaugeByName(name string) prometheus.Gauge

func NewRPCServerSendingQueueSizeGaugeByName

func NewRPCServerSendingQueueSizeGaugeByName(name string) prometheus.Gauge

func NewRPCServerSessionSizeGaugeByName

func NewRPCServerSessionSizeGaugeByName(name string) prometheus.Gauge

func NewRPCServerWriteDurationHistogramByName

func NewRPCServerWriteDurationHistogramByName(name string) prometheus.Observer

func NewRPCServerWriteLatencyDurationHistogramByName

func NewRPCServerWriteLatencyDurationHistogramByName(name string) prometheus.Observer

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL