Skip to content

Commit 68b2b08

Browse files
committed
fix(server): remove duplicate observability layer
1 parent 7bd6d00 commit 68b2b08

3 files changed

Lines changed: 0 additions & 15 deletions

File tree

packages/cli/src/server-process.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ const processEffect = Effect.fnUntraced(function* (options: Options) {
9292
file: process.env.OPENCODE_MODELS_PATH,
9393
fetch: !truthy(process.env.OPENCODE_DISABLE_MODELS_FETCH),
9494
},
95-
observability: {
96-
endpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT,
97-
headers: process.env.OTEL_EXPORTER_OTLP_HEADERS,
98-
},
9995
config: {
10096
directory: process.env.OPENCODE_CONFIG_DIR,
10197
project: !truthy(

packages/server/src/options.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Database } from "@opencode-ai/core/database/database"
22
import { ModelsDev } from "@opencode-ai/core/models-dev"
3-
import { Observability } from "@opencode-ai/util/observability"
43
import { Schema } from "effect"
54

65
export const ServerOptions = Schema.Struct({
@@ -22,7 +21,6 @@ export const ServerOptions = Schema.Struct({
2221
}),
2322
),
2423
models: Schema.optional(ModelsDev.Options),
25-
observability: Schema.optional(Observability.Options),
2624
config: Schema.optional(
2725
Schema.Struct({
2826
directory: Schema.optional(Schema.String),

packages/server/src/routes.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
77
import { Bus } from "@opencode-ai/core/bus"
88
import { EventLogger } from "@opencode-ai/core/event-logger"
99
import { FileSystemSearch } from "@opencode-ai/core/filesystem/search"
10-
import { Observability } from "@opencode-ai/util/observability"
1110
import { Credential } from "@opencode-ai/core/credential"
1211
import { Config } from "@opencode-ai/core/config"
1312
import { Command } from "@opencode-ai/core/command"
@@ -131,13 +130,6 @@ function makeRoutes<AuthError, AuthServices>(
131130
}),
132131
)
133132
: AppNodeBuilder.build(applicationServices, replacements)
134-
const observability = Observability.layer({
135-
...options.observability,
136-
client: options.app?.name,
137-
version: options.app?.version,
138-
channel: options.app?.channel,
139-
})
140-
141133
return serviceLayer.pipe(
142134
Layer.flatMap((context) => {
143135
const services = Layer.succeedContext(context)
@@ -161,6 +153,5 @@ function makeRoutes<AuthError, AuthServices>(
161153
)
162154
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)))
163155
}),
164-
Layer.provide(observability),
165156
)
166157
}

0 commit comments

Comments
 (0)