Skip to content

Commit

Permalink
Rename wal storage metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Okoko <[email protected]>
  • Loading branch information
idoqo committed Sep 17, 2021
1 parent 41d3408 commit 79b06d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ require (
github.com/prometheus/common v0.29.0
github.com/prometheus/exporter-toolkit v0.6.0
github.com/prometheus/prometheus v1.8.2-0.20210720123808-b1ed4a0a663d
github.com/stretchr/testify v1.7.0
github.com/tencentyun/cos-go-sdk-v5 v0.7.31
github.com/uber/jaeger-client-go v2.29.1+incompatible
github.com/uber/jaeger-lib v2.4.1+incompatible
Expand Down
12 changes: 6 additions & 6 deletions pkg/rules/remotewrite/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,27 @@ type storageMetrics struct {
func newStorageMetrics(r prometheus.Registerer) *storageMetrics {
m := storageMetrics{r: r}
m.numActiveSeries = promauto.With(r).NewGauge(prometheus.GaugeOpts{
Name: "agent_wal_storage_active_series",
Name: "thanos_wal_storage_active_series",
Help: "Current number of active series being tracked by the WAL storage",
})

m.numDeletedSeries = promauto.With(r).NewGauge(prometheus.GaugeOpts{
Name: "agent_wal_storage_deleted_series",
Name: "thanos_wal_storage_deleted_series",
Help: "Current number of series marked for deletion from memory",
})

m.totalCreatedSeries = promauto.With(r).NewCounter(prometheus.CounterOpts{
Name: "agent_wal_storage_created_series_total",
Name: "thanos_wal_storage_created_series_total",
Help: "Total number of created series appended to the WAL",
})

m.totalRemovedSeries = promauto.With(r).NewCounter(prometheus.CounterOpts{
Name: "agent_wal_storage_removed_series_total",
Name: "thanos_wal_storage_removed_series_total",
Help: "Total number of created series removed from the WAL",
})

m.totalAppendedSamples = promauto.With(r).NewCounter(prometheus.CounterOpts{
Name: "agent_wal_samples_appended_total",
Name: "thanos_wal_samples_appended_total",
Help: "Total number of samples appended to the WAL",
})

Expand Down Expand Up @@ -684,7 +684,7 @@ func (r *remoteWriteQueryable) LabelValues(name string, matchers ...*labels.Matc
return nil, nil, nil
}

func (r *remoteWriteQueryable) LabelNames() ([]string, storage.Warnings, error) {
func (r *remoteWriteQueryable) LabelNames(matchers ...*labels.Matcher) ([]string, storage.Warnings, error) {
return nil, nil, nil
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func TestRule_CanRemoteWriteData(t *testing.T) {
testutil.Ok(t, s.StartAndWaitReady(receiver))
rwURL := mustURLParse(t, e2ethanos.RemoteWriteEndpoint(receiver.NetworkEndpoint(8081)))

querier, err := e2ethanos.NewQuerierBuilder(s.SharedDir(), "1", []string{receiver.GRPCNetworkEndpoint()}).Build()
querier, err := e2ethanos.NewQuerierBuilder(s.SharedDir(), "1", receiver.GRPCNetworkEndpoint()).Build()
testutil.Ok(t, err)
testutil.Ok(t, s.StartAndWaitReady(querier))
r, err := e2ethanos.NewStatelessRuler(s.SharedDir(), "1", rulesSubDir, []alert.AlertmanagerConfig{
Expand Down

0 comments on commit 79b06d3

Please sign in to comment.