v2

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 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")

	S3WriteIODurationHistogram = s3IODurationHistogram.WithLabelValues("write")
	S3ReadIODurationHistogram  = s3IODurationHistogram.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")

	LocalWriteIODurationHistogram = localIODurationHistogram.WithLabelValues("write")
	LocalReadIODurationHistogram  = localIODurationHistogram.WithLabelValues("read")
)
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")
)
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")

	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")

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

	LogTailCollectDurationHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "logtail",
			Name:      "collect_duration_seconds",
			Help:      "Bucketed histogram of logtail collecting duration.",
			Buckets:   getDurationBuckets(),
		})
)
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 (
	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:   getDurationBuckets(),
		})

	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 (
	TaskFlushTableTailDurationHistogram = taskShortDurationHistogram.WithLabelValues("flush_table_tail")
	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 (
	TaskMergeScheduledByCounter = taskScheduledByCounter.WithLabelValues("merge")

	TaskMergedBlocksCounter = taskGeneratedStuffCounter.WithLabelValues("merged_block")
	TasKMergedSizeCounter   = taskGeneratedStuffCounter.WithLabelValues("merged_size")

	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")

	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")

	TxnRangesLoadedObjectMetaTotalCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "ranges_loaded_object_meta_total",
			Help:      "Total number of ranges loaded object meta.",
		})
)
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")

	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(),
		})

	TxnTableRangeSizeHistogram = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Namespace: "mo",
			Subsystem: "txn",
			Name:      "ranges_duration_size",
			Help:      "Bucketed histogram of txn table ranges size.",
			Buckets:   prometheus.ExponentialBuckets(1, 2.0, 20),
		})

	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")

	TxnDequeuePreparedDurationHistogram = txnTNSideDurationHistogram.WithLabelValues("dequeue_prepared")
	TxnBeforeCommitDurationHistogram    = txnTNSideDurationHistogram.WithLabelValues("before_txn_commit")

	TxnMpoolNewDurationHistogram    = txnMpoolDurationHistogram.WithLabelValues("new")
	TxnMpoolAllocDurationHistogram  = txnMpoolDurationHistogram.WithLabelValues("alloc")
	TxnMpoolFreeDurationHistogram   = txnMpoolDurationHistogram.WithLabelValues("free")
	TxnMpoolDeleteDurationHistogram = txnMpoolDurationHistogram.WithLabelValues("delete")

	TxnBlockReaderDurationHistogram      = txnReaderDurationHistogram.WithLabelValues("block-reader")
	TxnMergeReaderDurationHistogram      = txnReaderDurationHistogram.WithLabelValues("merge-reader")
	TxnBlockMergeReaderDurationHistogram = txnReaderDurationHistogram.WithLabelValues("block-merge-reader")
)
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 (
	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(),
		})
)
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 NewRPCMessageReceiveCounterByName

func NewRPCMessageReceiveCounterByName(name string) prometheus.Counter

func NewRPCMessageSendCounterByName

func NewRPCMessageSendCounterByName(name string) 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