Skip to content

Commit

Permalink
feat: adding phoenix
Browse files Browse the repository at this point in the history
  • Loading branch information
elviskahoro committed Oct 15, 2024
1 parent eef66f1 commit 975c6e5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions chat_v2/chat_v2/page_chat/chat_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ def get_otel_headers() -> None:
OTEL_ENDPOINT = "https://otlp.arize.com/v1"
RUN_WITH_OTEL = True


case "phoenix":
OTEL_HEADERS = f"api_key={os.environ.get('PHOENIX_API_KEY')}"
os.environ["PHOENIX_CLIENT_HEADERS"] = OTEL_HEADERS
OTEL_ENDPOINT = "https://app.phoenix.arize.com/v1/traces"
RUN_WITH_OTEL = True

case _:
OTEL_HEADERS = ""
OTEL_ENDPOINT = ""
Expand All @@ -75,8 +82,8 @@ def get_otel_headers() -> None:
get_ai_model()
get_otel_headers()
trace_attributes = {
"app_id": "chat_app",
"app_version": "v3",
"openinference.project.name": "chat_app",
"openinference.project.version": "v3",
"model_id": AI_MODEL,
}

Expand Down

0 comments on commit 975c6e5

Please sign in to comment.