fn: API stats and tags reoorganization (#1171)

Make sure we can apply extra tags if RegisterAPIViews() is
provided with such tags. Deduplicate path/method/status and
always apply these default tags to appropriate views.
This commit is contained in:
Tolga Ceylan
2018-08-11 17:00:37 -07:00
committed by GitHub
parent ba98ed6992
commit 976b91a77d
4 changed files with 51 additions and 46 deletions

View File

@@ -26,7 +26,6 @@ func main() {
func registerViews() {
keys := []string{"fn_appname", "fn_path"}
apiKeys := []string{"path", "method", "status"}
latencyDist := []float64{1, 10, 50, 100, 250, 500, 1000, 10000, 60000, 120000}
@@ -51,5 +50,5 @@ func registerViews() {
// Register s3 log views
s3.RegisterViews(keys, latencyDist)
server.RegisterAPIViews(apiKeys, latencyDist)
server.RegisterAPIViews([]string{}, latencyDist)
}