8000 fix: remove unused metric SpyDuration by bboreham · Pull Request #3646 · weaveworks/scope · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: remove unused metric SpyDuration #3646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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