Skip to content

Commit

Permalink
fix: remove unused metric SpyDuration
Browse files Browse the repository at this point in the history
The call to register this metric was removed in weaveworks#633 over three years ago.
If it isn't registered then nobody can see the values.
The measurement is duplicated by metrics added in weaveworks#658.
  • Loading branch information
bboreham authored and qiell committed Jul 5, 2019
1 parent 0e106f4 commit e8c0e1a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
15 changes: 0 additions & 15 deletions probe/endpoint/reporter.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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" }
6 changes: 0 additions & 6 deletions probe/endpoint/reporter_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
package endpoint

import (
"time"

"github.com/weaveworks/scope/report"
)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e8c0e1a

Please sign in to comment.