Documentation ¶
Index ¶
- Constants
- Variables
- func NewDirectoryEvent(dirTyp string) metrics.MetricsEvent
- func NewNotifyEvent(start time.Time) metrics.MetricsEvent
- func NewRegisterEvent(succ bool, start time.Time) metrics.MetricsEvent
- func NewServerRegisterEvent(succ bool, start time.Time) metrics.MetricsEvent
- func NewServerSubscribeEvent(succ bool) metrics.MetricsEvent
- func NewSubscribeEvent(succ bool) metrics.MetricsEvent
- type MetricName
- type RegistryMetricsEvent
Constants ¶
View Source
const ( NumAllInc = "numAllInc" NumAllDec = "numAllDec" NumDisableTotal = "numDisableTotal" NumToReconnectTotal = "numToReconnectTotal" NumValidTotal = "numValidTotal" )
Variables ¶
View Source
var ( // register metrics key RegisterMetricRequests = metrics.NewMetricKey("dubbo_registry_register_requests_total", "Total Register Requests") RegisterMetricRequestsSucceed = metrics.NewMetricKey("dubbo_registry_register_requests_succeed_total", "Succeed Register Requests") RegisterMetricRequestsFailed = metrics.NewMetricKey("dubbo_registry_register_requests_failed_total", "Failed Register Requests") // subscribe metrics key SubscribeMetricNum = metrics.NewMetricKey("dubbo_registry_subscribe_num_total", "Total Subscribe Num") SubscribeMetricNumSucceed = metrics.NewMetricKey("dubbo_registry_subscribe_num_succeed_total", "Succeed Subscribe Num") SubscribeMetricNumFailed = metrics.NewMetricKey("dubbo_registry_subscribe_num_failed_total", "Failed Subscribe Num") // directory metrics key DirectoryMetricNumAll = metrics.NewMetricKey("dubbo_registry_directory_num_all", "All Directory Urls") DirectoryMetricNumValid = metrics.NewMetricKey("dubbo_registry_directory_num_valid_total", "Valid Directory Urls") DirectoryMetricNumToReconnect = metrics.NewMetricKey("dubbo_registry_directory_num_to_reconnect_total", "ToReconnect Directory Urls") DirectoryMetricNumDisable = metrics.NewMetricKey("dubbo_registry_directory_num_disable_total", "Disable Directory Urls") NotifyMetricRequests = metrics.NewMetricKey("dubbo_registry_notify_requests_total", "Total Notify Requests") NotifyMetricNumLast = metrics.NewMetricKey("dubbo_registry_notify_num_last", "Last Notify Nums") // register service metrics key ServiceRegisterMetricRequests = metrics.NewMetricKey("dubbo_registry_register_service_total", "Total Service-Level Register Requests") ServiceRegisterMetricRequestsSucceed = metrics.NewMetricKey("dubbo_registry_register_service_succeed_total", "Succeed Service-Level Register Requests") ServiceRegisterMetricRequestsFailed = metrics.NewMetricKey("dubbo_registry_register_service_failed_total", "Failed Service-Level Register Requests") // subscribe metrics key ServiceSubscribeMetricNum = metrics.NewMetricKey("dubbo_registry_subscribe_service_num_total", "Total Service-Level Subscribe Num") ServiceSubscribeMetricNumSucceed = metrics.NewMetricKey("dubbo_registry_subscribe_service_num_succeed_total", "Succeed Service-Level Num") ServiceSubscribeMetricNumFailed = metrics.NewMetricKey("dubbo_registry_subscribe_service_num_failed_total", "Failed Service-Level Num") // register metrics server rt key RegisterServiceRt = metrics.NewMetricKey("dubbo_register_service_rt_milliseconds", "Service Register Time") // register metrics rt key RegisterRt = metrics.NewMetricKey("dubbo_register_rt_milliseconds", "Response Time") // notify rt key NotifyRt = metrics.NewMetricKey("dubbo_notify_rt_milliseconds", "Notify Time") )
Functions ¶
func NewDirectoryEvent ¶
func NewDirectoryEvent(dirTyp string) metrics.MetricsEvent
NewDirectoryEvent for directory metrics
func NewNotifyEvent ¶
func NewNotifyEvent(start time.Time) metrics.MetricsEvent
NewNotifyEvent for notify metrics
func NewRegisterEvent ¶
func NewRegisterEvent(succ bool, start time.Time) metrics.MetricsEvent
NewRegisterEvent for register metrics
func NewServerRegisterEvent ¶
func NewServerRegisterEvent(succ bool, start time.Time) metrics.MetricsEvent
NewServerRegisterEvent for server register metrics
func NewServerSubscribeEvent ¶
func NewServerSubscribeEvent(succ bool) metrics.MetricsEvent
NewServerSubscribeEvent for server subscribe metrics
func NewSubscribeEvent ¶
func NewSubscribeEvent(succ bool) metrics.MetricsEvent
NewSubscribeEvent for subscribe metrics
Types ¶
type MetricName ¶
type MetricName int8
const ( Reg MetricName = iota Sub Notify Directory ServerReg ServerSub )
type RegistryMetricsEvent ¶
type RegistryMetricsEvent struct { Name MetricName Succ bool Start time.Time End time.Time Attachment map[string]string }
RegistryMetricsEvent contains info about register metrics
func (*RegistryMetricsEvent) CostMs ¶
func (r *RegistryMetricsEvent) CostMs() float64
func (RegistryMetricsEvent) Type ¶
func (r RegistryMetricsEvent) Type() string
Click to show internal directories.
Click to hide internal directories.