mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
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/
18 lines
528 B
TypeScript
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()
|
|
}
|
|
}
|