diff --git a/promql/engine_test.go b/promql/engine_test.go index 61786950e..c3bec1315 100644 --- a/promql/engine_test.go +++ b/promql/engine_test.go @@ -8,10 +8,6 @@ import ( "golang.org/x/net/context" ) -var noop = testStmt(func(context.Context) error { - return nil -}) - func TestQueryConcurrency(t *testing.T) { engine := NewEngine(nil, nil) defer engine.Stop() diff --git a/promql/parse.go b/promql/parse.go index c91df6fb3..5cb1fef68 100644 --- a/promql/parse.go +++ b/promql/parse.go @@ -925,8 +925,6 @@ func (p *parser) offset() time.Duration { // [] // func (p *parser) vectorSelector(name string) *VectorSelector { - const ctx = "metric selector" - var matchers metric.LabelMatchers // Parse label matching if any. if t := p.peek(); t.typ == itemLeftBrace { diff --git a/retrieval/discovery/dns.go b/retrieval/discovery/dns.go index 7c744f8c0..cd1c01bf6 100644 --- a/retrieval/discovery/dns.go +++ b/retrieval/discovery/dns.go @@ -36,7 +36,6 @@ const ( // Constants for instrumentation. namespace = "prometheus" - interval = "interval" ) var ( diff --git a/retrieval/discovery/nerve.go b/retrieval/discovery/nerve.go index f99c9d61f..8422ce38b 100644 --- a/retrieval/discovery/nerve.go +++ b/retrieval/discovery/nerve.go @@ -28,8 +28,6 @@ import ( ) const ( - nerveNodePrefix = "member_" - nerveLabelPrefix = model.MetaLabelPrefix + "nerve_" nervePathLabel = nerveLabelPrefix + "path" nerveEndpointLabelPrefix = nerveLabelPrefix + "endpoint" diff --git a/retrieval/discovery/serverset.go b/retrieval/discovery/serverset.go index 5a13af63c..48748518f 100644 --- a/retrieval/discovery/serverset.go +++ b/retrieval/discovery/serverset.go @@ -30,8 +30,6 @@ import ( ) const ( - serversetNodePrefix = "member_" - serversetLabelPrefix = model.MetaLabelPrefix + "serverset_" serversetStatusLabel = serversetLabelPrefix + "status" serversetPathLabel = serversetLabelPrefix + "path" diff --git a/retrieval/scrape.go b/retrieval/scrape.go index c2ff4496e..925d8151f 100644 --- a/retrieval/scrape.go +++ b/retrieval/scrape.go @@ -14,7 +14,6 @@ package retrieval import ( - "errors" "fmt" "io" "net/http" @@ -37,9 +36,6 @@ const ( scrapeHealthMetricName = "up" scrapeDurationMetricName = "scrape_duration_seconds" - // Capacity of the channel to buffer samples during ingestion. - ingestedSamplesCap = 256 - // Constants for instrumentation. namespace = "prometheus" interval = "interval" @@ -47,8 +43,6 @@ const ( ) var ( - errSkippedScrape = errors.New("scrape skipped due to throttled ingestion") - targetIntervalLength = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Namespace: namespace, diff --git a/storage/remote/opentsdb/client.go b/storage/remote/opentsdb/client.go index dcf56ecc5..46575313f 100644 --- a/storage/remote/opentsdb/client.go +++ b/storage/remote/opentsdb/client.go @@ -21,7 +21,6 @@ import ( "math" "net/http" "net/url" - "regexp" "time" "github.com/prometheus/common/log" @@ -36,10 +35,6 @@ const ( contentTypeJSON = "application/json" ) -var ( - illegalCharsRE = regexp.MustCompile(`[^a-zA-Z0-9_\-./]`) -) - // Client allows sending batches of Prometheus samples to OpenTSDB. type Client struct { url string