Skip to content

Commit a538735

Browse files
committed
feat(supervisor): send metadata in compute sandbox creation requests
Pass business context (runId, envId, orgId, projectId, machine, etc.) as metadata on CreateSandboxRequest instead of relying on env vars. This enables wide event logging in the compute stack without parsing env or leaking secrets.
1 parent 74817d7 commit a538735

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/supervisor/src/workloadManager/compute.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ export class ComputeWorkloadManager implements WorkloadManager {
109109
body: JSON.stringify({
110110
image: imageRef,
111111
env: envVars,
112+
metadata: {
113+
runId: opts.runFriendlyId,
114+
envId: opts.envId,
115+
envType: opts.envType,
116+
orgId: opts.orgId,
117+
projectId: opts.projectId,
118+
deploymentVersion: opts.deploymentVersion,
119+
machine: opts.machine.name,
120+
},
112121
}),
113122
})
114123
);

0 commit comments

Comments
 (0)