feat(phoenix): /phoenix/v1/traces POST 는 비번 없이 — -13 이 8914 경유로 trace 보내는 길

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
lee-hyeon-cheol
2026-09-22 17:16:31 +09:00
co-authored by Claude Fable 5.1
parent 671f610371
commit eb3da84f22
3 changed files with 4 additions and 2 deletions
@@ -3,6 +3,7 @@
- Phoenix 는 PHOENIX_HOST_ROOT_PATH=/phoenix 로 떠 있음 — 이건 HTML 링크에만 /phoenix 를 붙이는 옵션이고
실제 경로는 접두어 없이 받음(실측: /phoenix/assets/… 는 SPA 폴백 HTML, /assets/… 가 진짜). 그래서 여기서 /phoenix 를 떼고 넘김.
- 관리자 화면이라 HTTP Basic 으로 잠금: PHOENIX_UI_PASSWORD (아이디 아무거나). 비우면 잠금 없음 — 사내망이라도 채우는 걸 권장.
- `POST /phoenix/v1/traces` 만 비번 없이 통과 — -13(ABAP_OPENCODE)이 바깥 8914 로 trace 를 보내는 길(다른 방이라 8915 직접 못 감).
- 웹소켓은 안 넘김(Django ASGI 가 안 받음) — 트레이스 화면은 HTTP 만으로 동작. 플레이그라운드 스트리밍 같은 건 안 됨.
"""
@@ -44,7 +45,8 @@ async def proxy(request: HttpRequest, rest: str = "") -> HttpResponse:
base = (settings.LANGFUSE.get("phoenix") or "").rstrip("/")
if not base:
return HttpResponse("PHOENIX_HOST 가 비어 있음", status=503)
if not _password_ok(request):
ingest = request.method == "POST" and rest.strip("/") == "v1/traces"
if not ingest and not _password_ok(request):
return _unauthorized()
# /phoenix/<rest> → PHOENIX_HOST/<rest> (접두어 떼고). 쿼리는 그대로.
url = base + "/" + rest.lstrip("/")
+1 -1
View File
@@ -29,7 +29,7 @@ Phoenix 는 protobuf 로만 받아서 백엔드 venv 에 `opentelemetry-proto`(+
- -12: `cd /www/abap-ito/code-assistant/5_django_backend && .venv/bin/pip install --no-index --find-links /www/phoenix-wheels opentelemetry-proto`
`.env``PHOENIX_HOST=http://127.0.0.1:8915``bash deploy.sh`
- -13: wheel 2개만 따로(`otel-proto-wheels.zip`, 400KB) → `cd /www/abap-ito/abap-specgen/web/BE/code && .venv/bin/pip install --no-index --find-links /www/otel-proto-wheels opentelemetry-proto`
`bare/.env``PHOENIX_HOST=http://10.196.81.34:8915``run.sh restart`
`bare/.env``PHOENIX_HOST=http://10.196.81.34:8914/phoenix` (-13 은 -12 의 8915 에 직접 못 가서 8914 중계 경유. `/phoenix/v1/traces` POST 만 비번 없이 통과)`run.sh restart`
- 웹 UI: 고객사 PC 에서 **`http://10.196.81.34:8914/phoenix/`** — 백엔드(8914)가 중계(`apps/gateway/phoenix_proxy.py`). 바깥에서 -12 로 오는 포트가 8914 뿐이라(8913/8915 는 다른 서비스) 이렇게 감.
브라우저가 비번 물으면 `.env``PHOENIX_UI_PASSWORD`(아이디 아무거나). 프로젝트 `codeassist` / `abap-specgen` 로 나뉨
Binary file not shown.