Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultMetricContext() context.Context
- func GetMetricContext(p context.Context, mk *tag.Key, v string) context.Context
- func GetMetricContextByCID(cid int) context.Context
- func Initialize(w module.Wallet)
- func Inspect(c module.Chain, informal bool) map[string]interface{}
- func NewMetricKey(k string) tag.Key
- func ParseMetricData(r *view.Row, prev interface{}, cnt int) interface{}
- func PrometheusExporter() *prometheus.Exporter
- func RegisterConsensus()
- func RegisterMetricView(m stats.Measure, a *view.Aggregation, tks []tag.Key) *view.View
- func RegisterNetwork()
- func RegisterTransaction()
- func RemoveMetricContext(mk *tag.Key, v string)
- func RemoveMetricContextByCID(cid int)
- func ResetMetricViews()
- type ConsensusMetric
- type NetworkMetric
- type TxMetric
Constants ¶
View Source
const ( TxTypePatch = "patch" TxTypeNormal = "normal" )
Variables ¶
View Source
var ( MetricKeyHostname = NewMetricKey("hostname") MetricKeyChain = NewMetricKey("channel") )
metric common tag key
Functions ¶
func DefaultMetricContext ¶
func GetMetricContext ¶
func GetMetricContextByCID ¶
func Initialize ¶
func NewMetricKey ¶
func ParseMetricData ¶
func PrometheusExporter ¶
func PrometheusExporter() *prometheus.Exporter
func RegisterConsensus ¶
func RegisterConsensus()
func RegisterMetricView ¶
func RegisterNetwork ¶
func RegisterNetwork()
func RegisterTransaction ¶
func RegisterTransaction()
func RemoveMetricContext ¶
func RemoveMetricContextByCID ¶
func RemoveMetricContextByCID(cid int)
func ResetMetricViews ¶
func ResetMetricViews()
Types ¶
type ConsensusMetric ¶
type ConsensusMetric struct {
// contains filtered or unexported fields
}
func NewConsensusMetric ¶
func NewConsensusMetric(ctx context.Context) *ConsensusMetric
func (*ConsensusMetric) OnHeight ¶
func (m *ConsensusMetric) OnHeight(height int64)
func (*ConsensusMetric) OnRound ¶
func (m *ConsensusMetric) OnRound(round int32)
type NetworkMetric ¶
type NetworkMetric struct {
// contains filtered or unexported fields
}
func NewNetworkMetric ¶
func NewNetworkMetric(ctx context.Context) *NetworkMetric
type TxMetric ¶
type TxMetric struct {
// contains filtered or unexported fields
}
func (*TxMetric) OnRemoveTx ¶
Click to show internal directories.
Click to hide internal directories.