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:
Tolga Ceylan
2018-10-04 15:58:21 -07:00
committed by GitHub
parent 7bda6ccf2b
commit 5a9118ff32
2 changed files with 5 additions and 5 deletions

View File

@@ -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) {