fix(opencode): make leto export opt-in by url
parent
ba41b6928f
commit
544d012515
|
|
@ -5,9 +5,7 @@ import { Flag } from "@/flag/flag"
|
||||||
import { CHANNEL, VERSION } from "@/installation/meta"
|
import { CHANNEL, VERSION } from "@/installation/meta"
|
||||||
|
|
||||||
export namespace Observability {
|
export namespace Observability {
|
||||||
const base = Flag.OPENCODE_DISABLE_OTLP
|
const base = Flag.OPENCODE_OTLP_BASE_URL?.trim() || undefined
|
||||||
? undefined
|
|
||||||
: (Flag.OPENCODE_OTLP_BASE_URL ?? (CHANNEL === "local" ? "http://127.0.0.1:27686" : undefined))
|
|
||||||
|
|
||||||
export const enabled = !!base
|
export const enabled = !!base
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ export namespace Flag {
|
||||||
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
|
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
|
||||||
export const OPENCODE_ENABLE_QUESTION_TOOL = truthy("OPENCODE_ENABLE_QUESTION_TOOL")
|
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_OTLP_BASE_URL = process.env["OPENCODE_OTLP_BASE_URL"]
|
||||||
export const OPENCODE_DISABLE_OTLP = truthy("OPENCODE_DISABLE_OTLP")
|
|
||||||
|
|
||||||
// Experimental
|
// Experimental
|
||||||
export const OPENCODE_EXPERIMENTAL = truthy("OPENCODE_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_CACHE_HOME"] = path.join(dir, "cache")
|
||||||
process.env["XDG_CONFIG_HOME"] = path.join(dir, "config")
|
process.env["XDG_CONFIG_HOME"] = path.join(dir, "config")
|
||||||
process.env["XDG_STATE_HOME"] = path.join(dir, "state")
|
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")
|
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
|
// Set test home directory to isolate tests from user's actual home directory
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue