Merge pull request #3646 from weaveworks/remove-useless-metric

fix: remove unused metric SpyDuration
This commit is contained in:
Bryan Boreham
2019-07-04 17:37:16 +01:00
committed by GitHub
2 changed files with 0 additions and 21 deletions

View File

@@ -1,9 +1,6 @@
package endpoint
import (
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/weaveworks/scope/probe/endpoint/procspy"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/report"
@@ -31,17 +28,5 @@ type ReporterConfig struct {
DNSSnooper *DNSSnooper
}
// SpyDuration is an exported prometheus metric
var SpyDuration = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Namespace: "scope",
Subsystem: "probe",
Name: "spy_duration_seconds",
Help: "Time in seconds spent spying on active connections.",
MaxAge: 10 * time.Second, // like statsd
},
[]string{},
)
// Name of this reporter, for metrics gathering
func (Reporter) Name() string { return "Endpoint" }

View File

@@ -3,8 +3,6 @@
package endpoint
import (
"time"
"github.com/weaveworks/scope/report"
)
@@ -39,10 +37,6 @@ func (r *Reporter) Stop() {
// Report implements Reporter.
func (r *Reporter) Report() (report.Report, error) {
defer func(begin time.Time) {
SpyDuration.WithLabelValues().Observe(time.Since(begin).Seconds())
}(time.Now())
rpt := report.MakeReport()
r.connectionTracker.ReportConnections(&rpt)