mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-20 22:10:30 +00:00
Merge pull request #3646 from weaveworks/remove-useless-metric
fix: remove unused metric SpyDuration
This commit is contained in:
@@ -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" }
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user