docs/deploy/observability.md

Observability

In the app

Most questions are answered without leaving Vocion: each chat turn's steps, tool calls, citations, tokens and cost; Activity for every run and fire; Observability (/dashboard/observability) for cost and latency. See Runs and evidence.

Langfuse

Langfuse records every model call — prompt, completion, tokens, cost, latency — tagged by feature, workspace and agent, so one model invoice becomes per-workspace, per-agent spend.

LANGFUSE_ENABLEDBehavior
falseOff
trueOn; missing keys fail at boot
unsetOn when keys are present; in production, off when they're missing

Set LANGFUSE_BASE_URL, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY (and LANGFUSE_PROJECT_ID for links). Traces older than LANGFUSE_RETENTION_DAYS (365) are deleted by a daily job, which needs the schedule owner running.

  • Local: npm run dev:up starts Langfuse at http://localhost:3200.
  • vocion-stack: doesn't self-host Langfuse. Use Langfuse Cloud (keys in the app secret) or set LANGFUSE_ENABLED=false.
  • Older single-host path: self-hosts Langfuse on the host by default; LANGFUSE_SELF_HOSTED_REPLICAS=0 opts out.

Check a setup with npm run langfuse:smoke --workspace @vocion/core.

Errors and logs

  • Sentry: NEXT_PUBLIC_SENTRY_DSN.
  • Logs: LogTape to stdout; Better Stack with NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN and NEXT_PUBLIC_BETTER_STACK_INGESTING_HOST.
  • On vocion-stack: the deploy log is /var/log/vocion-deploy-last.log on the host; ALB, WAF and VPC flow logs are kept 90 days; alarms go to alarm_emails.