Skip to main content

Environment variables

All env vars the plugin reads. Most shaping vars are HERMES_OTEL_*-prefixed and override the corresponding config.yaml field.

Backend selection

Setting any of these enables the matching backend. First match wins (see Backends overview for priority order).

VarBackendExample
LANGSMITH_TRACINGLangSmithtrue
LANGSMITH_API_KEYLangSmithlsv2_...
LANGSMITH_ENDPOINTLangSmith (optional)https://api.smith.langchain.com
LANGSMITH_PROJECTLangSmith (optional)hermes-langsmith-otel
OTEL_LANGFUSE_PUBLIC_API_KEYLangfuse (plugin-specific)pk-lf-...
OTEL_LANGFUSE_SECRET_API_KEYLangfuse (plugin-specific)sk-lf-...
OTEL_LANGFUSE_ENDPOINTLangfuse (plugin-specific)https://cloud.langfuse.com/api/public/otel
LANGFUSE_PUBLIC_KEYLangfuse (SDK-standard)pk-lf-...
LANGFUSE_SECRET_KEYLangfuse (SDK-standard)sk-lf-...
LANGFUSE_BASE_URLLangfuse (SDK-standard)https://cloud.langfuse.com
OTEL_SIGNOZ_ENDPOINTSigNozhttp://localhost:4328/v1/traces
OTEL_SIGNOZ_INGESTION_KEYSigNoz Cloudsz-...
OTEL_JAEGER_ENDPOINTJaegerhttp://localhost:4318/v1/traces
OTEL_TEMPO_ENDPOINTTempohttp://localhost:4318/v1/traces
OTEL_PHOENIX_ENDPOINTPhoenixhttp://localhost:6006/v1/traces
OTEL_PROJECT_NAMEAllhermes-agent

Shaping overrides

Each of these overrides the corresponding field in config.yaml. See config.yaml for defaults and field-level docs.

Env varMaps toType
HERMES_OTEL_ENABLEDenabledbool
HERMES_OTEL_SAMPLE_RATEsample_ratefloat 0..1
HERMES_OTEL_ROOT_SPAN_TTL_MSroot_span_ttl_msint (ms)
HERMES_OTEL_FLUSH_INTERVAL_MSflush_interval_msint (ms)
HERMES_OTEL_PREVIEW_MAX_CHARSpreview_max_charsint
HERMES_OTEL_CAPTURE_PREVIEWScapture_previewsbool
HERMES_OTEL_CAPTURE_CONVERSATION_HISTORYcapture_conversation_historybool
HERMES_OTEL_CONVERSATION_HISTORY_MAX_CHARSconversation_history_max_charsint
HERMES_OTEL_PROJECT_NAMEproject_namestring
HERMES_OTEL_SPAN_BATCH_MAX_QUEUE_SIZEspan_batch_max_queue_sizeint
HERMES_OTEL_SPAN_BATCH_SCHEDULE_DELAY_MSspan_batch_schedule_delay_msint (ms)
HERMES_OTEL_SPAN_BATCH_MAX_EXPORT_BATCH_SIZEspan_batch_max_export_batch_sizeint
HERMES_OTEL_SPAN_BATCH_EXPORT_TIMEOUT_MSspan_batch_export_timeout_msint (ms)
HERMES_OTEL_FORCE_FLUSH_ON_SESSION_ENDforce_flush_on_session_endbool

Debug / diagnostics

VarEffect
HERMES_OTEL_DEBUGtrue enables per-span debug log to ~/.hermes/plugins/hermes_otel/debug.log. See Debug logging.

Boolean parsing

Anywhere the plugin reads a boolean env var, the following are accepted:

  • True: true, 1, yes, on (case-insensitive)
  • False: false, 0, no, off, "" (case-insensitive)

Anything else logs a warning and falls back to the default.

Where to set them

The easiest place is ~/.hermes/.env, which Hermes auto-loads on startup:

OTEL_PHOENIX_ENDPOINT=http://localhost:6006/v1/traces
OTEL_PROJECT_NAME=hermes-agent
HERMES_OTEL_CAPTURE_PREVIEWS=true
HERMES_OTEL_SAMPLE_RATE=0.25

Or export them in your shell profile (~/.bashrc, ~/.zshrc) for a global default.

tip

Prefer ~/.hermes/.env for per-machine config. Per-shell exports are fine for experimentation but drift from what you've committed to config.yaml.