mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: default fnserver tag keys and api key adjustment (#1261)
Default fn server keys should be minimal (empty) since not all stats have associated app name, fn id, etc. API tags for requests should not include "status" as this is part of responses.
This commit is contained in:
@@ -105,9 +105,11 @@ func RegisterAPIViews(tagKeys []string, dist []float64) {
|
||||
// add extra tags if not already in default tags for req/resp
|
||||
for _, key := range tagKeys {
|
||||
if key != "path" && key != "method" && key != "status" {
|
||||
reqTags = append(reqTags, common.MakeKey(key))
|
||||
respTags = append(respTags, common.MakeKey(key))
|
||||
}
|
||||
if key != "path" && key != "method" {
|
||||
reqTags = append(reqTags, common.MakeKey(key))
|
||||
}
|
||||
}
|
||||
|
||||
err := view.Register(
|
||||
@@ -133,7 +135,6 @@ func DefaultAPIViewsGetPath(routes gin.RoutesInfo, c *gin.Context) string {
|
||||
}
|
||||
|
||||
func apiMetricsWrap(s *Server) {
|
||||
|
||||
measure := func(engine *gin.Engine) func(*gin.Context) {
|
||||
var routes gin.RoutesInfo
|
||||
return func(c *gin.Context) {
|
||||
@@ -169,7 +170,6 @@ func apiMetricsWrap(s *Server) {
|
||||
a := s.AdminRouter
|
||||
a.Use(measure(a))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func panicWrap(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user