Skip to content
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
6 changes: 0 additions & 6 deletions cmd/stackdriver-prometheus-sidecar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ type genericConfig struct {
namespace string
}

type gceMetadata struct {
projectID string
location string
cluster string
}

type fileConfig struct {
MetricRenames []struct {
From string `json:"from"`
Expand Down
2 changes: 1 addition & 1 deletion metadata/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type Cache struct {

// DefaultEndpointPath is the default HTTP path on which Prometheus serves
// the target metadata endpoint.
const DefaultEndpointPath = "/api/v1/targets/metadata"
const DefaultEndpointPath = "api/v1/targets/metadata"

// The old metric type value for textparse.MetricTypeUnknown that is used in
// Prometheus 2.4 and earlier.
Expand Down
15 changes: 0 additions & 15 deletions retrieval/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/prometheus/tsdb"
tsdbLabels "github.com/prometheus/tsdb/labels"
distribution_pb "google.golang.org/genproto/googleapis/api/distribution"
metric_pb "google.golang.org/genproto/googleapis/api/metric"
monitoring_pb "google.golang.org/genproto/googleapis/monitoring/v3"
)

Expand Down Expand Up @@ -152,20 +151,6 @@ func getMetricType(prefix string, promName string) string {
return prefix + "/" + promName
}

func getMetricKind(t textparse.MetricType) metric_pb.MetricDescriptor_MetricKind {
if t == textparse.MetricTypeCounter || t == textparse.MetricTypeHistogram {
return metric_pb.MetricDescriptor_CUMULATIVE
}
return metric_pb.MetricDescriptor_GAUGE
}

func getValueType(t textparse.MetricType) metric_pb.MetricDescriptor_ValueType {
if t == textparse.MetricTypeHistogram {
return metric_pb.MetricDescriptor_DISTRIBUTION
}
return metric_pb.MetricDescriptor_DOUBLE
}

// getTimestamp converts a millisecond timestamp into a protobuf timestamp.
func getTimestamp(t int64) *timestamp_pb.Timestamp {
return &timestamp_pb.Timestamp{
Expand Down
1 change: 0 additions & 1 deletion stackdriver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
)

const (
metricsPrefix = "external.googleapis.com/prometheus"
MaxTimeseriesesPerRequest = 200
MonitoringWriteScope = "https://www.googleapis.com/auth/monitoring.write"
)
Expand Down
1 change: 0 additions & 1 deletion stackdriver/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func newLocalListener() net.Listener {

func TestStoreErrorHandling(t *testing.T) {
tests := []struct {
code int
status *status.Status
recoverable bool
}{
Expand Down
5 changes: 0 additions & 5 deletions stackdriver/queue_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ func newShard(cfg config.QueueConfig) shard {

type shardCollection struct {
qm *QueueManager
client StorageClient
shards []shard
done chan struct{}
wg sync.WaitGroup
Expand All @@ -428,10 +427,6 @@ func (t *QueueManager) newShardCollection(numShards int) *shardCollection {
return s
}

func (s *shardCollection) len() int {
return len(s.shards)
}

func (s *shardCollection) start() {
for i := range s.shards {
go s.runShard(i)
Expand Down
2 changes: 1 addition & 1 deletion targets/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/prometheus/prometheus/pkg/labels"
)

const DefaultAPIEndpoint = "/api/v1/targets"
const DefaultAPIEndpoint = "api/v1/targets"

func cacheKey(job, instance string) string {
return job + "\xff" + instance
Expand Down