Skip to content

Commit

Permalink
Deduplicate metamonitoring queries (thanos-io#6121)
Browse files Browse the repository at this point in the history
* Deduplicate metamonitoring queries

Signed-off-by: Andre Baptista Aguas <[email protected]>
Signed-off-by: Andre Baptista Aguas <[email protected]>

* Update CHANGELOG

Signed-off-by: Andre Baptista Aguas <[email protected]>
Signed-off-by: Andre Baptista Aguas <[email protected]>

* do not remove empty line from CHANGELOG

Signed-off-by: Andre Baptista Aguas <[email protected]>

---------

Signed-off-by: Andre Baptista Aguas <[email protected]>
Signed-off-by: Andre Baptista Aguas <[email protected]>
Co-authored-by: Andre Baptista Aguas <[email protected]>
  • Loading branch information
2 people authored and Nathaniel Graham committed Apr 17, 2023
1 parent d7c4e63 commit 2db70b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#6082](https://github.com/thanos-io/thanos/pull/6082) Store: Don't error when no stores are matched.
- [#6098](https://github.com/thanos-io/thanos/pull/6098) Cache/Redis: upgrade `rueidis` to v0.0.93 to fix potential panic when the client-side caching is disabled.
- [#6103](https://github.com/thanos-io/thanos/pull/6103) Mixins(Rule): Fix query for long rule evaluations.
- [#6121](https://github.com/thanos-io/thanos/pull/6121) Receive: Deduplicate metamonitoring queries.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion pkg/receive/head_series_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func NewHeadSeriesLimit(w WriteLimitsConfig, registerer prometheus.Registerer, l
func (h *headSeriesLimit) QueryMetaMonitoring(ctx context.Context) error {
c := promclient.NewWithTracingClient(h.logger, h.metaMonitoringClient, httpconfig.ThanosUserAgent)

vectorRes, _, err := c.QueryInstant(ctx, h.metaMonitoringURL, h.metaMonitoringQuery, time.Now(), promclient.QueryOptions{})
vectorRes, _, err := c.QueryInstant(ctx, h.metaMonitoringURL, h.metaMonitoringQuery, time.Now(), promclient.QueryOptions{Deduplicate: true})
if err != nil {
h.metaMonitoringErr.Inc()
return err
Expand Down

0 comments on commit 2db70b6

Please sign in to comment.