metrics

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// For server admin service, send token states
	SvrAdminSendAttempt = "attempt"
	SvrAdminSendSucceed = "succeed"

	// For server forward message
	SvrFwdMsgAttempt = "attempt"
	SvrFwdMsgSucceed = "succeed"

	// For delegate, state info for each payment
	DelegatePayAttempt = "attempt"
	DelegatePaySucceed = "succeed"

	// For cnode, channel type and openchannel state
	CNodeTcbChan     = "tcb"
	CNodeRegularChan = "regular"
	CNodeOpenChanOK  = "OK"
	CNodeOpenChanErr = "ERROR"
)

Variables

This section is empty.

Functions

func GetPromExporter

func GetPromExporter() *prometheus.Exporter

GetPromExporter would return the prometheus exporter

func GetPromRegistry

func GetPromRegistry() *prom.Registry

GetPromRegistry would return the prometheus resgistry

func IncCNodeOpenChanEventCnt

func IncCNodeOpenChanEventCnt(chantype, state string)

IncCNodeOpenChanEventCnt records one for mCNodeOpenChanEvengCnt

func IncCommonErrCnt

func IncCommonErrCnt(err error)

IncCommonErrCnt records one for mCommonErrCnt

func IncCoopWithdrawEventCnt

func IncCoopWithdrawEventCnt()

IncCoopWithdrawEventCnt records one for mCoopWithdrawEventCnt

func IncDelegatePayCnt

func IncDelegatePayCnt(paystat string)

IncDelegatePayCnt records one for mDelegatePayCnt

func IncDepositErrCnt

func IncDepositErrCnt()

IncDepositErrCnt records one for mDepositErrCnt

func IncDepositEventCnt

func IncDepositEventCnt()

IncDepositEventCnt records one for mDepositEventCnt

func IncDepositJobCnt

func IncDepositJobCnt()

IncDepositJobCnt records one for mDepositJobCnt

func IncDepositPoolAlertCnt

func IncDepositPoolAlertCnt()

IncDepositPoolAlertCnt records one for mDepositPoolAlertCnt

func IncDepositTxCnt

func IncDepositTxCnt()

IncDepositTxCnt records one for mDepositTxCnt

func IncDispatcherErrCnt

func IncDispatcherErrCnt(msgtype string)

IncDispatcherErrCnt records one for mDispatcherErrCnt

func IncDispatcherMsgCnt

func IncDispatcherMsgCnt(msgtype string)

IncDispatcherMsgCnt records one for mDispatcherMsgCnt

func IncDispatcherMsgProcDur

func IncDispatcherMsgProcDur(startTime time.Time, msgtype string)

IncDispatcherMsgProcDur records duration in millisecond for mDispatcherMsgProcDur

func IncDisputeSettleEventCnt

func IncDisputeSettleEventCnt(eventstate string)

IncDisputeSettleEventCnt records one for mDisputeSettleEventCnt

func IncDisputeWithdrawEventCnt

func IncDisputeWithdrawEventCnt(eventstate string)

IncDisputeWithdrawEventCnt records one for mDisputeWithdrawEventCnt

func IncSvrAdminSendTokenCnt

func IncSvrAdminSendTokenCnt(sendstat, notetype string)

IncSvrAdminSendTokenCnt records one for mAdminSendTokenCnt

func IncSvrFwdMsgCnt

func IncSvrFwdMsgCnt(msgtype int32, fwdstat string)

IncSvrFwdMsgCnt records one for mSvrFwdMshCnt

func PushMetricsToGateway

func PushMetricsToGateway(url, job string)

PushMetricsToGateway push all the metrics to the gateway url. This function is designed for ephemeral jobs

Types

This section is empty.

Jump to

Keyboard shortcuts

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