Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draft of metrics bus #2351

Merged
merged 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add some comment
  • Loading branch information
FinalT committed Jul 7, 2023
commit c3023b744f70f21624a1849156152883c655a71f
9 changes: 9 additions & 0 deletions metrics/registry/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ import (

type RegistryMetricsEvent struct {
//Contains some information, such as time, success, failure

// PostType MetricKey
// FinishType MetricKey
// ErrorType MetricKey
// Level MetricsLevel

// Time
// Start time.time
// End time.time
}

func (r RegistryMetricsEvent) Type() string {
Expand Down
9 changes: 4 additions & 5 deletions metrics/registry/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ var (
handlers []func(event *RegistryMetricsEvent)
)

//func Collector(m metrics.MetricRegistry, r *metrics.ReporterConfig) {
// regRegistry = m
// func Collector(m metrics.MetricRegistry, r *metrics.ReporterConfig) {
// regRegistry = m
//
// // init related metrics
//}

// // init related metrics
// }
func init() {
AddHandler(regHandler, subHandler, notifyHandler, directoryHandler, serverSubHandler, serverRegHandler)
//metrics.AddCollector(Collector)
Expand Down