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
Removing go-kit/metrics/provider to save us from dependency overload #177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐼 🐼 🐼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍔
server/simple_server.go
Outdated
}), registeredPath, r.Method, s.mets).ServeHTTP(w, r) | ||
|
||
registeredPath = strings.TrimPrefix(registeredPath, "/") | ||
prometheus.InstrumentHandler(registeredPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're changing this code, can you change this to use InstrumentHandlerWithOpts ()
with
SummaryOpts{
Subsystem: "http",
ConstLabels: Labels{"handler": handlerName},
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.95: 0.005, 0.99: 0.001},
}
This should add the 95%tile which will give us a better comparison number as it seems like a lot of teams use 95% instead of 90%tile or 99%tile.
Danke!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done. Mind taking a look and verifying its what you want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - thanks!
prometheus.InstrumentHandlerWithOpts(prometheus.SummaryOpts{ | ||
Subsystem: "http", | ||
ConstLabels: prometheus.Labels{"handler": registeredPath}, | ||
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.95: 0.005, 0.99: 0.001}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
🚀 🚀 🚀 🚀 🚀 |
At this point in time, everyone at NYT is either using Prometheus or OpenCensus + Stackdriver (or they should be)
To save us from requiring the entire world of dependencies behind
go-kit/metrics/provider
, includingmgo
,influxdb
and all sorts of weird test clients, I'm removing:config/metrics
packageserver.Config.Metrics
and replacing it with 3 fields for Prometheus specificallyserver/metrics.go
kit/metrics/provider
in the examples.