Skip to content

Commit ec51765

Browse files
chore: add targets to oom/ood notifications (coder#16968)
Add targets to OOM/OOD notifications to allow Coder Inbox clients to filter on these notifications.
1 parent a3f6308 commit ec51765

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

coderd/agentapi/resources_monitoring.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func (a *ResourcesMonitoringAPI) monitorMemory(ctx context.Context, datapoints [
157157
"timestamp": a.Clock.Now(),
158158
},
159159
"workspace-monitor-memory",
160+
workspace.ID,
161+
workspace.OwnerID,
162+
workspace.OrganizationID,
160163
)
161164
if err != nil {
162165
return xerrors.Errorf("notify workspace OOM: %w", err)
@@ -248,6 +251,9 @@ func (a *ResourcesMonitoringAPI) monitorVolumes(ctx context.Context, datapoints
248251
"timestamp": a.Clock.Now(),
249252
},
250253
"workspace-monitor-volumes",
254+
workspace.ID,
255+
workspace.OwnerID,
256+
workspace.OrganizationID,
251257
); err != nil {
252258
return xerrors.Errorf("notify workspace OOD: %w", err)
253259
}

0 commit comments

Comments
 (0)