Environment variables reference

The canonical list. Every TREFUR_* variable below maps to a real option in either the SDKs or the collector — nothing invented.

SDK variables (every language)

VariableDefaultMeaning
TREFUR_API_KEYrequiredYour Observe ingest key. Prefix trf_obs_*.
TREFUR_AGENT_NAMEauto-detectedStable identifier for this agent. Recommended to set explicitly in deployment env.
TREFUR_DISABLEDunsetSet to true to short-circuit every wrap + emit in all SDKs — the reliable kill-switch that every language honours at every call site. (The JS SDK additionally accepts 1 / yes / on.) Useful for tests + incident kill-switch.
TREFUR_AUTO_INSTRUMENTunsetJS: * or a comma list of http,fetch,axios,fs,child_process. Python: * or all or a comma list of http,fs,exec. Enables the generic in-process instrumentors at init.

Collector variables

VariableDefaultMeaning
TREFUR_API_KEYrequiredCollector API key. Prefix trf_coll_*.
TREFUR_ENDPOINThttps://api.trefur.comTrefur cloud endpoint. Override for staging or sovereign deployments.
TREFUR_COLLECTOR_IDauto-generatedStable identifier for this collector instance. Used in heartbeats + audit log attribution.
TREFUR_LOG_LEVELinfoOne of trace, debug, info, warn, error.
TREFUR_COLLECTOR_CONFIGunsetOverride the config-file lookup path. Falls back to $XDG_CONFIG_HOME/trefur/collector.yaml then ~/.trefur/collector.yaml.
TREFUR_COLLECTOR_VERSIONbuild-time stampOverride the version reported in heartbeats. The dashboard uses this for the "upgrade available" UX.

Provider variables (read by the SDK + collector when relevant)

VariableRead byMeaning
OPENAI_API_KEYauto-instrumented OpenAI clientNever logged or shipped — Trefur redacts it from Authorization headers.
ANTHROPIC_API_KEYauto-instrumented Anthropic clientNever logged or shipped — same redaction rule.

Secrets interpolation

Every collector YAML string field supports ${ENV_VAR} interpolation. The literal value comes from the environment at startup, never from disk. Read more under collector configuration.