Files
opencode/packages/opencode/src/trace/index.ts
Dax c34aec060f Merge agent and mode into one (#1689)
The concept of mode has been deprecated, there is now only the agent field in the config.

An agent can be cycled through as your primary agent with <tab> or you can spawn a subagent by @ mentioning it. if you include a description of when to use it, the primary agent will try to automatically use it

Full docs here: https://opencode.ai/docs/agents/
2025-08-07 16:32:12 -04:00

18 lines
528 B
TypeScript

import { NodeSDK } from "@opentelemetry/sdk-node"
import { FetchInstrumentation } from "@opentelemetry/instrumentation-fetch"
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http"
export namespace Trace {
export function init() {
const sdk = new NodeSDK({
serviceName: "opencode",
instrumentations: [new FetchInstrumentation()],
traceExporter: new OTLPTraceExporter({
url: "http://localhost:4318/v1/traces", // or your OTLP endpoint
}),
})
sdk.start()
}
}