feat(observability): Langfuse 전송 — 턴 마무리(사용자 trace)·게이트웨이(FabriX generation) 두 훅, SDK 없이 HTTP. deploy/langfuse 에 compose+env+반입 절차

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
lee-hyeon-cheol
2026-09-22 13:44:12 +09:00
co-authored by Claude Fable 5.1
parent 95b169a7b9
commit 0321050053
13 changed files with 617 additions and 0 deletions
+6
View File
@@ -88,6 +88,12 @@ STREAM_FIRST_EVENT_TIMEOUT_S = int(_env("STREAM_FIRST_EVENT_TIMEOUT_S", "300"))
from apps.gateway.fabrix import ENV_KEYS as _FABRIX_KEYS # noqa: E402
FABRIX_ENV = {k: _env(k) for k in _FABRIX_KEYS}
# Langfuse(LLM 관측) — 자체 호스팅 주소 + 프로젝트 키. HOST 비우면 전송 안 함
LANGFUSE = {
"host": _env("LANGFUSE_HOST"),
"public_key": _env("LANGFUSE_PUBLIC_KEY"),
"secret_key": _env("LANGFUSE_SECRET_KEY"),
}
# 세션 컨텍스트 하드 한도 — usage.limit 로 프론트 게이지에 감
CONTEXT_LIMIT_TOKENS = int(_env("CONTEXT_LIMIT_TOKENS", "128000") or "128000")