Skip to main content

Config schema

Complete schema for ~/.hermes/plugins/hermes_otel/config.yaml. See config.yaml for the narrative version.

Top level

FieldTypeDefaultDescription
enabledbooltrueMaster kill switch
project_namestring(unset)Overrides OTEL_PROJECT_NAME
sample_ratefloat | nullnullParent-based trace ID ratio (0.0–1.0); null = AlwaysOn
preview_max_charsint1200Cap on preview strings before truncation
capture_previewsbooltruefalse = suppress all input/output previews
capture_conversation_historyboolfalseAttach full message JSON to llm.* spans
conversation_history_max_charsint20000JSON cap when conversation capture is on
capture_logsboolfalseAttach OTel LoggingHandler to Python logging; see OTel logs
log_levelstring"INFO"Handler level: DEBUG / INFO / WARNING / ERROR / CRITICAL
log_attach_loggerstring | nullnullLogger to attach to; null = root, "hermes_otel" = scope to plugin
root_span_ttl_msint600000Orphan-sweep TTL in ms
flush_interval_msint60000Metrics export cadence
force_flush_on_session_endbooltrueSync flush every backend at end-of-turn
span_batch_max_queue_sizeint2048Max buffered spans per backend
span_batch_schedule_delay_msint1000Worker wake-up cadence
span_batch_max_export_batch_sizeint512Max spans per OTLP POST
span_batch_export_timeout_msint30000Per-export HTTP timeout
global_tagsmap{}Merged into Resource; overridden by resource_attributes on key conflict
resource_attributesmap{}Merged into Resource
headersmap{}Extra HTTP headers on every OTLP request
backendslist(unset)Multi-backend fan-out; see below

When backends: is present and non-empty, single-backend env-var detection is skipped.

backends[] entries

Shared fields (all optional unless noted):

FieldTypeDescription
typestringRequired. One of: phoenix, langfuse, langsmith, signoz, jaeger, tempo, otlp, lgtm, uptrace, openobserve
namestringFriendly name shown in logs (default: type)
endpointstringFull OTLP endpoint URL (backend-specific defaults — see below)
metricsboolOverride metrics-export default for this backend
logsboolOverride logs-export default (on for signoz, otlp, lgtm, uptrace, openobserve; off elsewhere)
headersmapPer-backend HTTP headers (merged onto top-level headers)

Type-specific fields

phoenix

FieldTypeDescription
endpointstringDefault: http://localhost:6006/v1/traces

langfuse

FieldTypeDescription
public_keystringLangfuse public key (inline; discouraged)
public_key_envstringEnv var name holding the public key
secret_keystringLangfuse secret key (inline; discouraged)
secret_key_envstringEnv var name holding the secret key
base_urlstringLangfuse base URL (e.g. https://cloud.langfuse.com); the plugin appends /api/public/otel/v1/traces
endpointstringOverride; skips base_url construction

Basic Auth header is constructed automatically from public + secret keys.

signoz

FieldTypeDescription
endpointstringOTLP endpoint (self-host: http://localhost:4328/v1/traces; cloud: https://ingest.<region>.signoz.cloud:443/v1/traces)
ingestion_keystringSigNoz Cloud ingestion key (inline; discouraged)
ingestion_key_envstringEnv var name holding the ingestion key

When an ingestion key is set, the plugin adds the signoz-ingestion-key header.

jaeger

FieldTypeDescription
endpointstringOTLP endpoint (default: http://localhost:4318/v1/traces). Auto-disables metrics.

tempo

FieldTypeDescription
endpointstringOTLP endpoint. Auto-disables metrics.

otlp

FieldTypeDescription
endpointstringRequired. OTLP traces endpoint
metricsboolDefault: true; set false for traces-only collectors
logsboolDefault: true; set false if the collector doesn't accept /v1/logs

Use headers: for auth (${VAR} interpolation supported).

lgtm

Alias over otlp with a dedicated display name and all signals on by default. See Grafana LGTM.

FieldTypeDescription
endpointstringRequired. OTLP traces endpoint — http://localhost:4318/v1/traces for the bundled docker-compose/lgtm.yaml
metricsboolDefault: true
logsboolDefault: true

Use type: lgtm (not type: tempo) when pointing at the grafana/otel-lgtm container — tempo is traces-only and would disable the logs/metrics fan-out.

Env var interpolation in headers:

Inside any headers: value, ${VAR_NAME} is replaced with the env var's value at startup:

headers:
Authorization: "Bearer ${OTEL_AUTH_TOKEN}"
x-honeycomb-team: ${HONEYCOMB_API_KEY}

Missing env vars result in a startup warning and the literal ${VAR} being sent (which will fail auth, but visibly so).

Precedence

For every field, precedence (highest → lowest) is:

  1. HERMES_OTEL_* env var (if applicable — see Env var reference)
  2. config.yaml value
  3. Built-in default

Validation

On startup the plugin validates the config and:

  • Logs a warning and falls back to the default for an invalid value
  • Logs a single warning and uses empty config if YAML parsing fails
  • Silently skips the YAML file if pyyaml isn't installed

The plugin never crashes Hermes because of config — at worst, it disables itself with a clear log line.