Skip to content

Commit 27fc9a0

Browse files
committed
WIP
1 parent bb3602b commit 27fc9a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/prometheusmetrics/aggregator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type annotatedMetric struct {
5656
username string
5757
workspaceName string
5858
agentName string
59+
labels []agentsdk.AgentMetricLabel
5960

6061
expiryDate time.Time
6162
}
@@ -122,7 +123,7 @@ func (ma *MetricsAggregator) Run(ctx context.Context) func() {
122123
UpdateLoop:
123124
for _, m := range req.metrics {
124125
for i, q := range ma.queue {
125-
if q.username == req.username && q.workspaceName == req.workspaceName && q.agentName == req.agentName && q.Name == m.Name {
126+
if q.username == req.username && q.workspaceName == req.workspaceName && q.agentName == req.agentName && q.Name == m.Name && q.labels == m.Labels {
126127
ma.queue[i].AgentMetric.Value = m.Value
127128
ma.queue[i].expiryDate = req.timestamp.Add(ma.metricsCleanupInterval)
128129
continue UpdateLoop

0 commit comments

Comments
 (0)