Reduce metrics mechanism to just support fastdp
This commit is contained in:
1 parent
0458d32089
commit
4d8a40c0b5
2 files changed
+5
-20
No files matched your search
@@ -91,10 +91,10 @@ var metrics []metric = []metric{
|
||||
}
|
||||
|
||||
func fastDPMetrics(s WeaveStatus) *weave.FastDPMetrics {
|
||||
if reporter, ok := s.Router.OverlayDiagnostics.(weave.MetricsReporter); ok {
|
||||
if metrics := reporter.Metrics(); metrics != nil {
|
||||
if fastdpMetrics, ok := metrics.(*weave.FastDPMetrics); ok {
|
||||
return fastdpMetrics
|
||||
if diagMap, ok := s.Router.OverlayDiagnostics.(map[string]interface{}); ok {
|
||||
if diag, ok := diagMap["fastdp"]; ok {
|
||||
if fastDPStats, ok := diag.(weave.FastDPStatus); ok {
|
||||
return fastDPStats.Metrics().(*weave.FastDPMetrics)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user