Skip to content

Commit

Permalink
pkg/query: remove obsolete 'thanos_store_node_info' metric
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
  • Loading branch information
simonpasquier committed Apr 23, 2020
1 parent ebee995 commit 5f62baa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ We use *breaking* word for marking changes that are not backward compatible (rel

- [#2501](https://github.com/thanos-io/thanos/pull/2501) Query: gracefully handle additional fields in `SeriesResponse` protobuf message that may be added in the future.

### Changed

- [#2505](https://github.com/thanos.io/thanos/pull/2505) Store: remove obsolete `thanos_store_node_info` metric.

## [v0.12.1](https://github.com/thanos-io/thanos/releases/tag/v0.12.1) - 2020.04.20

### Fixed
Expand All @@ -23,9 +27,6 @@ We use *breaking* word for marking changes that are not backward compatible (rel
- [#2474](https://github.com/thanos-io/thanos/pull/2474) Store: fix a panic caused by concurrent memory access during block filtering.
- [#2472](https://github.com/thanos-io/thanos/pull/2472) Compact: fix a bug where partial blocks were never deleted, causing spam of warnings.
- [#2484](https://github.com/thanos-io/thanos/pull/2484) Query/Ruler: fix issue #2483, when web.route-prefix is set, it is added twice in HTTP router prefix.

### Fixed

- [#2416](https://github.com/thanos-io/thanos/pull/2416) Bucket: fixes issue #2416 bug in `inspect --sort-by` doesn't work correctly in all cases
- [#2411](https://github.com/thanos-io/thanos/pull/2411) Query: fix a bug where queries might not time out sometimes due to issues with one or more StoreAPIs

Expand Down
16 changes: 2 additions & 14 deletions pkg/query/storeset.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ func (s *grpcStoreSpec) Metadata(ctx context.Context, client storepb.StoreClient
return resp.LabelSets, resp.MinTime, resp.MaxTime, component.FromProto(resp.StoreType), nil
}

// storeSetNodeCollector is metric collector for Guge indicated number of available storeAPIs for Querier.
// Collector is requires as we want atomic updates for all 'thanos_store_nodes_grpc_connections' series.
// storeSetNodeCollector is a metric collector reporting the number of available storeAPIs for Querier.
// A Collector is required as we want atomic updates for all 'thanos_store_nodes_grpc_connections' series.
type storeSetNodeCollector struct {
mtx sync.Mutex
storeNodes map[component.StoreAPI]map[string]int
storePerExtLset map[string]int

connectionsDesc *prometheus.Desc
nodeInfoDesc *prometheus.Desc
}

func newStoreSetNodeCollector() *storeSetNodeCollector {
Expand All @@ -104,13 +103,6 @@ func newStoreSetNodeCollector() *storeSetNodeCollector {
"Number of gRPC connection to Store APIs. Opened connection means healthy store APIs available for Querier.",
[]string{"external_labels", "store_type"}, nil,
),
// TODO(bwplotka): Obsolete; Replaced by thanos_store_nodes_grpc_connections.
// Remove in next minor release.
nodeInfoDesc: prometheus.NewDesc(
"thanos_store_node_info",
"Deprecated, use thanos_store_nodes_grpc_connections instead.",
[]string{"external_labels"}, nil,
),
}
}

Expand All @@ -134,7 +126,6 @@ func (c *storeSetNodeCollector) Update(nodes map[component.StoreAPI]map[string]i

func (c *storeSetNodeCollector) Describe(ch chan<- *prometheus.Desc) {
ch <- c.connectionsDesc
ch <- c.nodeInfoDesc
}

func (c *storeSetNodeCollector) Collect(ch chan<- prometheus.Metric) {
Expand All @@ -150,9 +141,6 @@ func (c *storeSetNodeCollector) Collect(ch chan<- prometheus.Metric) {
ch <- prometheus.MustNewConstMetric(c.connectionsDesc, prometheus.GaugeValue, float64(occurrences), externalLabels, storeTypeStr)
}
}
for externalLabels, occur := range c.storePerExtLset {
ch <- prometheus.MustNewConstMetric(c.nodeInfoDesc, prometheus.GaugeValue, float64(occur), externalLabels)
}
}

// StoreSet maintains a set of active stores. It is backed up by Store Specifications that are dynamically fetched on
Expand Down

0 comments on commit 5f62baa

Please sign in to comment.