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)
| Variable | Default | Meaning |
|---|---|---|
TREFUR_API_KEY | required | Your Observe ingest key. Prefix trf_obs_*. |
TREFUR_AGENT_NAME | auto-detected | Stable identifier for this agent. Recommended to set explicitly in deployment env. |
TREFUR_DISABLED | unset | Set 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_INSTRUMENT | unset | JS: * 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
| Variable | Default | Meaning |
|---|---|---|
TREFUR_API_KEY | required | Collector API key. Prefix trf_coll_*. |
TREFUR_ENDPOINT | https://api.trefur.com | Trefur cloud endpoint. Override for staging or sovereign deployments. |
TREFUR_COLLECTOR_ID | auto-generated | Stable identifier for this collector instance. Used in heartbeats + audit log attribution. |
TREFUR_LOG_LEVEL | info | One of trace, debug, info, warn, error. |
TREFUR_COLLECTOR_CONFIG | unset | Override the config-file lookup path. Falls back to $XDG_CONFIG_HOME/trefur/collector.yaml then ~/.trefur/collector.yaml. |
TREFUR_COLLECTOR_VERSION | build-time stamp | Override the version reported in heartbeats. The dashboard uses this for the "upgrade available" UX. |
Provider variables (read by the SDK + collector when relevant)
| Variable | Read by | Meaning |
|---|---|---|
OPENAI_API_KEY | auto-instrumented OpenAI client | Never logged or shipped — Trefur redacts it from Authorization headers. |
ANTHROPIC_API_KEY | auto-instrumented Anthropic client | Never 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.