claudeacp: Config.NoNonessentialTraffic and Config.ExportTelemetry #16
Loading…
Reference in a new issue
No description provided.
Delete branch "quiet-claude"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
spec-bb1.42, the library's part (the owner: nothing to third parties from Claude Code, the telemetry to his own collector, "возможно как опцию"). Two options beside
TaskTools, both off by default (zero values keep today's behaviour) and both keeping a variable the environment already has, the agent's own or a session's_metaenv:Config.NoNonessentialTrafficsetsCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC,DISABLE_TELEMETRY,DISABLE_ERROR_REPORTING,DISABLE_FEEDBACK_COMMAND,CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY,DISABLE_AUTOUPDATER,CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALLto1. The list is from Claude Code's data-usage and env-vars documentation and measured (the finding-out is on spec-bb1.42): onesay hiturn on claude 2.1.325 behind a logging CONNECT proxy opens 3 connections toapi.anthropic.comby default and 1 with these set. The WebFetch domain check is a setting (skipWebFetchPreflight), not a variable; the README says it is not set.Config.ExportTelemetrysetsCLAUDE_CODE_ENABLE_TELEMETRY=1,OTEL_METRICS_EXPORTER=otlp,OTEL_LOGS_EXPORTER=otlponly when the environment names an OTLP endpoint (OTEL_EXPORTER_OTLP_ENDPOINT, or the metrics or logs one): with no address there is no export, and the address, protocol and resource attributes stay the deployment's (an OpenTelemetry operator's injection, for the sandbox). Measured: with every switch above set, claude still exports (twoPOST /v1/metricsand twoPOST /v1/logsto a local receiver in that turn), so the two options do not fight.The three options' variables are set in one place (
envDefaults) instead of one block each. Tests:TestNoNonessentialTrafficVariables,TestExportTelemetryVariables(off by default; set; the environment's and a session's value kept; no endpoint no export; a session's endpoint counts). README and changelog (Unreleased/Added).go test ./... -raceand golangci-lint pass. No release here; the version is cut as 0.7.0 was, after review.