Skip to content

Commit

Permalink
PMM-13082 leave a TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Oct 10, 2024
1 parent c82e6e9 commit 7b2d5f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions managed/services/qan/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func collectAgents(q *reform.Querier, metricsBuckets []*agentv1.MetricsBucket) (
agentIDs := make(map[string]struct{})
for _, m := range metricsBuckets {
if id := m.Common.AgentId; id != "" {
// TODO: remove once v2 hits end-of-support
id, _ := strings.CutPrefix(id, "/agent_id/")
agentIDs[id] = struct{}{}
}
Expand Down Expand Up @@ -182,6 +183,7 @@ func (c *Client) Collect(ctx context.Context, metricsBuckets []*agentv1.MetricsB

convertedMetricsBuckets := make([]*qanv1.MetricsBucket, 0, len(metricsBuckets))
for _, m := range metricsBuckets {
// TODO: remove once v2 hits end-of-support
agentID, _ := strings.CutPrefix(m.Common.AgentId, "/agent_id/")
agent := agents[agentID]
if agent == nil {
Expand Down

0 comments on commit 7b2d5f8

Please sign in to comment.