mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-23 22:34:53 +00:00
fix(opencode): make leto export opt-in by url
This commit is contained in:
@@ -5,9 +5,7 @@ import { Flag } from "@/flag/flag"
|
||||
import { CHANNEL, VERSION } from "@/installation/meta"
|
||||
|
||||
export namespace Observability {
|
||||
const base = Flag.OPENCODE_DISABLE_OTLP
|
||||
? undefined
|
||||
: (Flag.OPENCODE_OTLP_BASE_URL ?? (CHANNEL === "local" ? "http://127.0.0.1:27686" : undefined))
|
||||
const base = Flag.OPENCODE_OTLP_BASE_URL?.trim() || undefined
|
||||
|
||||
export const enabled = !!base
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ export namespace Flag {
|
||||
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
|
||||
export const OPENCODE_ENABLE_QUESTION_TOOL = truthy("OPENCODE_ENABLE_QUESTION_TOOL")
|
||||
export const OPENCODE_OTLP_BASE_URL = process.env["OPENCODE_OTLP_BASE_URL"]
|
||||
export const OPENCODE_DISABLE_OTLP = truthy("OPENCODE_DISABLE_OTLP")
|
||||
|
||||
// Experimental
|
||||
export const OPENCODE_EXPERIMENTAL = truthy("OPENCODE_EXPERIMENTAL")
|
||||
|
||||
@@ -33,7 +33,6 @@ process.env["XDG_DATA_HOME"] = path.join(dir, "share")
|
||||
process.env["XDG_CACHE_HOME"] = path.join(dir, "cache")
|
||||
process.env["XDG_CONFIG_HOME"] = path.join(dir, "config")
|
||||
process.env["XDG_STATE_HOME"] = path.join(dir, "state")
|
||||
process.env["OPENCODE_DISABLE_OTLP"] = "1"
|
||||
process.env["OPENCODE_MODELS_PATH"] = path.join(import.meta.dir, "tool", "fixtures", "models-api.json")
|
||||
|
||||
// Set test home directory to isolate tests from user's actual home directory
|
||||
|
||||
Reference in New Issue
Block a user