mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user