Skip to content

Commit aa05b9a

Browse files
authored
fix(core): pass OTEL config to workspace env (#23154)
1 parent 68834cf commit aa05b9a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/opencode/src/control-plane/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type WorkspaceAdaptor = {
2828
name: string
2929
description: string
3030
configure(info: WorkspaceInfo): WorkspaceInfo | Promise<WorkspaceInfo>
31-
create(info: WorkspaceInfo, env: Record<string, string>, from?: WorkspaceInfo): Promise<void>
31+
create(info: WorkspaceInfo, env: Record<string, string | undefined>, from?: WorkspaceInfo): Promise<void>
3232
remove(info: WorkspaceInfo): Promise<void>
3333
target(info: WorkspaceInfo): Target | Promise<Target>
3434
}

packages/opencode/src/control-plane/workspace.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ export const create = fn(CreateInput, async (input) => {
115115
OPENCODE_AUTH_CONTENT: JSON.stringify(await AppRuntime.runPromise(Auth.Service.use((auth) => auth.all()))),
116116
OPENCODE_WORKSPACE_ID: config.id,
117117
OPENCODE_EXPERIMENTAL_WORKSPACES: "true",
118+
OTEL_EXPORTER_OTLP_HEADERS: process.env.OTEL_EXPORTER_OTLP_HEADERS,
119+
OTEL_EXPORTER_OTLP_ENDPOINT: process.env.OTEL_EXPORTER_OTLP_ENDPOINT,
118120
}
119121
await adaptor.create(config, env)
120122

0 commit comments

Comments
 (0)