should turn on views regardless of exporter (#1059)

https://github.com/fnproject/fn/pull/1058/files#r194913723
This commit is contained in:
Reed Allman
2018-06-12 22:45:50 -07:00
committed by Tolga Ceylan
parent e2a58f9403
commit e848b4c88e

View File

@@ -468,11 +468,8 @@ func WithAgentFromEnv() ServerOption {
placer = pool.NewNaivePlacer() placer = pool.NewNaivePlacer()
} }
// If prometheus is enabled, add LB placer metrics to the views keys := []string{"fn_appname", "fn_path"}
if s.promExporter != nil { pool.RegisterPlacerViews(keys)
keys := []string{"fn_appname", "fn_path"}
pool.RegisterPlacerViews(keys)
}
s.agent, err = agent.NewLBAgent(agent.NewCachedDataAccess(cl), runnerPool, placer) s.agent, err = agent.NewLBAgent(agent.NewCachedDataAccess(cl), runnerPool, placer)
if err != nil { if err != nil {