Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SEATA_TRANSACTION = "seata.transaction" NAME_KEY = "name" ROLE_KEY = "role" METER_KEY = "meter" STATISTIC_KEY = "statistic" STATUS_KEY = "status" ROLE_VALUE_TC = "tc" ROLE_VALUE_TM = "tm" ROLE_VALUE_RM = "rm" METER_VALUE_GAUGE = "gauge" METER_VALUE_COUNTER = "counter" METER_VALUE_SUMMARY = "summary" METER_VALUE_TIMER = "timer" STATISTIC_VALUE_COUNT = "count" STATISTIC_VALUE_TOTAL = "total" STATISTIC_VALUE_TPS = "tps" STATISTIC_VALUE_MAX = "max" STATISTIC_VALUE_AVERAGE = "average" STATUS_VALUE_ACTIVE = "active" STATUS_VALUE_COMMITTED = "committed" STATUS_VALUE_ROLLBACKED = "rollbacked" )
View Source
var ( COUNTER_ACTIVE = &Counter{ Counter: metrics.NewCounter(), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_COUNTER, STATUS_KEY: STATUS_VALUE_ACTIVE, }, } COUNTER_COMMITTED = &Counter{ Counter: metrics.NewCounter(), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_COUNTER, STATUS_KEY: STATUS_VALUE_COMMITTED, }, } COUNTER_ROLLBACKED = &Counter{ Counter: metrics.NewCounter(), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_COUNTER, STATUS_KEY: STATUS_VALUE_ROLLBACKED, }, } SUMMARY_COMMITTED = &Summary{ Meter: metrics.NewMeter(), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_SUMMARY, STATUS_KEY: STATUS_VALUE_COMMITTED, }, } SUMMARY_ROLLBACKED = &Summary{ Meter: metrics.NewMeter(), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_SUMMARY, STATUS_KEY: STATUS_VALUE_ROLLBACKED, }, } TIMER_COMMITTED = &Histogram{ Histogram: metrics.NewHistogram(metrics.NewExpDecaySample(1028, 0.015)), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_TIMER, STATUS_KEY: STATUS_VALUE_COMMITTED, }, } TIMER_ROLLBACK = &Histogram{ Histogram: metrics.NewHistogram(metrics.NewExpDecaySample(1028, 0.015)), Name: SEATA_TRANSACTION, Labels: map[string]string{ ROLE_KEY: ROLE_VALUE_TC, METER_KEY: METER_VALUE_TIMER, STATUS_KEY: STATUS_VALUE_ROLLBACKED, }, } )
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct { metrics.Counter Name string Labels map[string]string // contains filtered or unexported fields }
func (*Counter) SortedLabels ¶
type Histogram ¶
type Histogram struct { metrics.Histogram Name string Labels map[string]string // contains filtered or unexported fields }
func (*Histogram) SortedLabels ¶
type MetricsSubscriber ¶
type MetricsSubscriber struct { }
func (*MetricsSubscriber) ProcessGlobalTransactionEvent ¶
func (subscriber *MetricsSubscriber) ProcessGlobalTransactionEvent()
Click to show internal directories.
Click to hide internal directories.