arize-phoenix 8.29.0__py3-none-any.whl → 8.30.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-8.29.0.dist-info → arize_phoenix-8.30.0.dist-info}/METADATA +1 -1
- {arize_phoenix-8.29.0.dist-info → arize_phoenix-8.30.0.dist-info}/RECORD +17 -16
- phoenix/config.py +33 -8
- phoenix/server/api/helpers/playground_spans.py +4 -0
- phoenix/server/authorization.py +53 -0
- phoenix/server/grpc_server.py +3 -1
- phoenix/server/main.py +20 -9
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-DepxScNF.js → components-BypB0fGT.js} +1 -1
- phoenix/server/static/assets/{index-DUj7q3Q4.js → index-Ccebc6-h.js} +1 -1
- phoenix/server/static/assets/{pages-CJUakDKi.js → pages-DGdjQlsy.js} +94 -94
- phoenix/session/client.py +1 -1
- phoenix/version.py +1 -1
- {arize_phoenix-8.29.0.dist-info → arize_phoenix-8.30.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-8.29.0.dist-info → arize_phoenix-8.30.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-8.29.0.dist-info → arize_phoenix-8.30.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-8.29.0.dist-info → arize_phoenix-8.30.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
phoenix/__init__.py,sha256=X3eUEwd2rG8KKWWYVNNDJoqo08ihfjgHhlP29dcdNJE,5481
|
|
2
2
|
phoenix/auth.py,sha256=VVMHrWN31tln3Zo4z6ofecrV4daiqJjLd8r85mqlxek,10939
|
|
3
|
-
phoenix/config.py,sha256=
|
|
3
|
+
phoenix/config.py,sha256=p6uh69Tk0t1orLqrWrSoQ42xt6ceJyuR2BYSBYMlme0,51117
|
|
4
4
|
phoenix/datetime_utils.py,sha256=iJzNG6YJ6V7_u8B2iA7P2Z26FyxYbOPtx0dhJ7kNDHA,3398
|
|
5
5
|
phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
6
6
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
7
|
phoenix/services.py,sha256=ngkyKGVatX3cO2WJdo2hKdaVKP-xJCMvqthvga6kJss,5196
|
|
8
8
|
phoenix/settings.py,sha256=x87BX7hWGQQZbrW_vrYqFR_izCGfO9gFc--JXUG4Tdk,754
|
|
9
|
-
phoenix/version.py,sha256=
|
|
9
|
+
phoenix/version.py,sha256=638ZRUG4tJUhIoPEqobGe8ch91ac1hVzQMqfk59uxtY,23
|
|
10
10
|
phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
|
|
12
12
|
phoenix/core/model.py,sha256=qBFraOtmwCCnWJltKNP18DDG0mULXigytlFsa6YOz6k,4837
|
|
@@ -81,12 +81,13 @@ phoenix/pointcloud/projectors.py,sha256=TQgwc9cJDjJkin1WZyZzgl3HsYrLLiyWD7Czy4jN
|
|
|
81
81
|
phoenix/pointcloud/umap_parameters.py,sha256=db_WEPoamuWtopZx7tQfAXPnoE0MS8FkAV0_ThjEx_Q,1735
|
|
82
82
|
phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
83
|
phoenix/server/app.py,sha256=1lPHzZwWlTpwzEaO6jmgO18Ib4ssBxoLO9fwbfT_ois,39053
|
|
84
|
+
phoenix/server/authorization.py,sha256=fofeRwuoodCUB3DQYPCuAgIyeiwopXW0tkH_KZvU0Rg,1848
|
|
84
85
|
phoenix/server/bearer_auth.py,sha256=9AY0-aOSHm-B7OYB-20jFA7bETAA6S1_W1za42A8Yt8,6804
|
|
85
86
|
phoenix/server/dml_event.py,sha256=MjJmVEKytq75chBOSyvYDusUnEbg1pHpIjR3pZkUaJA,2838
|
|
86
87
|
phoenix/server/dml_event_handler.py,sha256=EZLXmCvx4pJrCkz29gxwKwmvmUkTtPCHw6klR-XM8qE,8258
|
|
87
|
-
phoenix/server/grpc_server.py,sha256=
|
|
88
|
+
phoenix/server/grpc_server.py,sha256=dod29zE_Zlir7NyLcdVM8GH3P8sy-9ykzfaBfVifyE4,4656
|
|
88
89
|
phoenix/server/jwt_store.py,sha256=asxzY4_ZBM2FWAMstHvhvnKUP_0AA3v3xPTL2IOgNqY,16831
|
|
89
|
-
phoenix/server/main.py,sha256=
|
|
90
|
+
phoenix/server/main.py,sha256=Twpig08FSHIwICMr-2qGNLNoCrgk6EjyHrrxiBwS_VU,18029
|
|
90
91
|
phoenix/server/oauth2.py,sha256=EV4wcCwG0N7cJRcfGNURdP5rZgRVCeRDvXyle19A27Y,2064
|
|
91
92
|
phoenix/server/prometheus.py,sha256=1KjvSfjSa2-BPjDybVMM_Kag316CsN-Zwt64YNr_snc,7825
|
|
92
93
|
phoenix/server/rate_limiters.py,sha256=cFc73D2NaxqNZZDbwfIDw4So-fRVOJPBtqxOZ8Qky_s,7155
|
|
@@ -146,7 +147,7 @@ phoenix/server/api/helpers/dataset_helpers.py,sha256=DoMBTg-qXTnC_K4Evx1WKpCCYgR
|
|
|
146
147
|
phoenix/server/api/helpers/experiment_run_filters.py,sha256=DOnVwrmn39eAkk2mwuZP8kIcAnR5jrOgllEwWSjsw94,29893
|
|
147
148
|
phoenix/server/api/helpers/playground_clients.py,sha256=tHwW-HbnoxU-EXXVvmY_1lbYh3Mv7QKw-e9KnREc7m4,41814
|
|
148
149
|
phoenix/server/api/helpers/playground_registry.py,sha256=CPLMziFB2wmr-dfbx7VbzO2f8YIG_k5RftzvGXYGQ1w,2570
|
|
149
|
-
phoenix/server/api/helpers/playground_spans.py,sha256=
|
|
150
|
+
phoenix/server/api/helpers/playground_spans.py,sha256=ObAhvV_yNwEQDkjzgU5G73wfIisc8q4cpB0OFH5cd24,16974
|
|
150
151
|
phoenix/server/api/helpers/prompts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
152
|
phoenix/server/api/helpers/prompts/models.py,sha256=zwWBA5GQvEHT4xyZwP-_kr1rJZ7SHnguATsQwsFw5aw,19519
|
|
152
153
|
phoenix/server/api/helpers/prompts/conversions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -318,10 +319,10 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
|
|
|
318
319
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
319
320
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
320
321
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
321
|
-
phoenix/server/static/.vite/manifest.json,sha256=
|
|
322
|
-
phoenix/server/static/assets/components-
|
|
323
|
-
phoenix/server/static/assets/index-
|
|
324
|
-
phoenix/server/static/assets/pages-
|
|
322
|
+
phoenix/server/static/.vite/manifest.json,sha256=LT4zk-ACfPJOdvtfdMat3RKSRZf8dq9HnPMdrnLmLsU,2165
|
|
323
|
+
phoenix/server/static/assets/components-BypB0fGT.js,sha256=AYnKnOwh7u_OwervE0AmQ7myFDgYIiwCyjrfoL8OAJg,456419
|
|
324
|
+
phoenix/server/static/assets/index-Ccebc6-h.js,sha256=lHdYZrNRbUI4kVqQcji9pKK9ofB_y0v8D7f73NJX7gI,60460
|
|
325
|
+
phoenix/server/static/assets/pages-DGdjQlsy.js,sha256=AaD6DdUBqgt7rAHyo-aiewoNp5CWNKFQ5NkeJL0Cdnc,864937
|
|
325
326
|
phoenix/server/static/assets/vendor-BfhM_F1u.js,sha256=S90L1KRZOw_NX6C9FENfLs6bSuEzf7zVDAqjZAZJZgE,2514280
|
|
326
327
|
phoenix/server/static/assets/vendor-Cg6lcjUC.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
|
|
327
328
|
phoenix/server/static/assets/vendor-arizeai-CxXYQNUl.js,sha256=V0umBNhH2psKhzwNKvLylYrqVfHu4I6NDSqejmR2OIU,193248
|
|
@@ -332,7 +333,7 @@ phoenix/server/static/assets/vendor-three-C5WAXd5r.js,sha256=ELkg06u70N7h8oFmvqd
|
|
|
332
333
|
phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
334
|
phoenix/server/templates/index.html,sha256=e8_jdi7Eo19SK7DI_gglkTW094D17E0VAegoMmmmvIc,4330
|
|
334
335
|
phoenix/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
335
|
-
phoenix/session/client.py,sha256=
|
|
336
|
+
phoenix/session/client.py,sha256=51UCIZ_k4Wd4b8f4Yi888MOie6nhF8E_5in41eBTUVU,35234
|
|
336
337
|
phoenix/session/data_extractor.py,sha256=Y0RzYFaNy9fQj8PEIeQ76TBZ90_E1FW7bXu3K5x0EZY,2782
|
|
337
338
|
phoenix/session/evaluation.py,sha256=Q3fOMNELvqkk-b6a6PKc8pDJdsNQ0ZbTpseUSA2NKqs,5300
|
|
338
339
|
phoenix/session/session.py,sha256=twE8tld8knShmTpZp6R80CUt2jau3RmfdfZAQCLSTKU,27621
|
|
@@ -368,9 +369,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
|
|
|
368
369
|
phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
|
|
369
370
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
370
371
|
phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
|
|
371
|
-
arize_phoenix-8.
|
|
372
|
-
arize_phoenix-8.
|
|
373
|
-
arize_phoenix-8.
|
|
374
|
-
arize_phoenix-8.
|
|
375
|
-
arize_phoenix-8.
|
|
376
|
-
arize_phoenix-8.
|
|
372
|
+
arize_phoenix-8.30.0.dist-info/METADATA,sha256=5Q2XR0ZPn6hBnWkTNeQ5Ajdr4paRK-agq2gBwWccXHA,24478
|
|
373
|
+
arize_phoenix-8.30.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
374
|
+
arize_phoenix-8.30.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
|
|
375
|
+
arize_phoenix-8.30.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
376
|
+
arize_phoenix-8.30.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
377
|
+
arize_phoenix-8.30.0.dist-info/RECORD,,
|
phoenix/config.py
CHANGED
|
@@ -244,6 +244,14 @@ ENV_PHOENIX_TLS_ENABLED = "PHOENIX_TLS_ENABLED"
|
|
|
244
244
|
"""
|
|
245
245
|
Whether to enable TLS for Phoenix HTTP and gRPC servers.
|
|
246
246
|
"""
|
|
247
|
+
ENV_PHOENIX_TLS_ENABLED_FOR_HTTP = "PHOENIX_TLS_ENABLED_FOR_HTTP"
|
|
248
|
+
"""
|
|
249
|
+
Whether to enable TLS for Phoenix HTTP server. Overrides PHOENIX_TLS_ENABLED.
|
|
250
|
+
"""
|
|
251
|
+
ENV_PHOENIX_TLS_ENABLED_FOR_GRPC = "PHOENIX_TLS_ENABLED_FOR_GRPC"
|
|
252
|
+
"""
|
|
253
|
+
Whether to enable TLS for Phoenix gRPC server. Overrides PHOENIX_TLS_ENABLED.
|
|
254
|
+
"""
|
|
247
255
|
ENV_PHOENIX_TLS_CERT_FILE = "PHOENIX_TLS_CERT_FILE"
|
|
248
256
|
"""
|
|
249
257
|
Path to the TLS certificate file for HTTPS connections.
|
|
@@ -392,15 +400,32 @@ class TLSConfigVerifyClient(TLSConfig):
|
|
|
392
400
|
return self._ca_data
|
|
393
401
|
|
|
394
402
|
|
|
395
|
-
def
|
|
403
|
+
def get_env_tls_enabled_for_http() -> bool:
|
|
404
|
+
"""
|
|
405
|
+
Gets whether TLS is enabled for the HTTP server.
|
|
406
|
+
|
|
407
|
+
This function checks both PHOENIX_TLS_ENABLED_FOR_HTTP and PHOENIX_TLS_ENABLED environment variables.
|
|
408
|
+
If PHOENIX_TLS_ENABLED_FOR_HTTP is set, it takes precedence over PHOENIX_TLS_ENABLED.
|
|
409
|
+
|
|
410
|
+
Returns:
|
|
411
|
+
bool: True if TLS is enabled for HTTP server, False otherwise. Defaults to False if neither
|
|
412
|
+
environment variable is set.
|
|
413
|
+
""" # noqa: E501
|
|
414
|
+
return _bool_val(ENV_PHOENIX_TLS_ENABLED_FOR_HTTP, _bool_val(ENV_PHOENIX_TLS_ENABLED, False))
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
def get_env_tls_enabled_for_grpc() -> bool:
|
|
396
418
|
"""
|
|
397
|
-
Gets
|
|
419
|
+
Gets whether TLS is enabled for the gRPC server.
|
|
420
|
+
|
|
421
|
+
This function checks both PHOENIX_TLS_ENABLED_FOR_GRPC and PHOENIX_TLS_ENABLED environment variables.
|
|
422
|
+
If PHOENIX_TLS_ENABLED_FOR_GRPC is set, it takes precedence over PHOENIX_TLS_ENABLED.
|
|
398
423
|
|
|
399
424
|
Returns:
|
|
400
|
-
bool: True if TLS is enabled, False otherwise. Defaults to False if
|
|
401
|
-
variable is
|
|
425
|
+
bool: True if TLS is enabled for gRPC server, False otherwise. Defaults to False if neither
|
|
426
|
+
environment variable is set.
|
|
402
427
|
""" # noqa: E501
|
|
403
|
-
return _bool_val(ENV_PHOENIX_TLS_ENABLED, False)
|
|
428
|
+
return _bool_val(ENV_PHOENIX_TLS_ENABLED_FOR_GRPC, _bool_val(ENV_PHOENIX_TLS_ENABLED, False))
|
|
404
429
|
|
|
405
430
|
|
|
406
431
|
def get_env_tls_verify_client() -> bool:
|
|
@@ -434,7 +459,7 @@ def get_env_tls_config() -> Optional[TLSConfig]:
|
|
|
434
459
|
ValueError: If required files are missing or don't exist when TLS is enabled
|
|
435
460
|
""" # noqa: E501
|
|
436
461
|
# Check if TLS is enabled
|
|
437
|
-
if not
|
|
462
|
+
if not (get_env_tls_enabled_for_http() or get_env_tls_enabled_for_grpc()):
|
|
438
463
|
return None
|
|
439
464
|
|
|
440
465
|
# Get certificate file path if specified
|
|
@@ -1193,7 +1218,7 @@ def get_env_root_url() -> URL:
|
|
|
1193
1218
|
host = get_env_host()
|
|
1194
1219
|
if host == "0.0.0.0":
|
|
1195
1220
|
host = "127.0.0.1"
|
|
1196
|
-
scheme = "https" if
|
|
1221
|
+
scheme = "https" if get_env_tls_enabled_for_http() else "http"
|
|
1197
1222
|
return URL(urljoin(f"{scheme}://{host}:{get_env_port()}", get_env_host_root_path()))
|
|
1198
1223
|
|
|
1199
1224
|
|
|
@@ -1202,7 +1227,7 @@ def get_base_url() -> str:
|
|
|
1202
1227
|
host = get_env_host()
|
|
1203
1228
|
if host == "0.0.0.0":
|
|
1204
1229
|
host = "127.0.0.1"
|
|
1205
|
-
scheme = "https" if
|
|
1230
|
+
scheme = "https" if get_env_tls_enabled_for_http() else "http"
|
|
1206
1231
|
base_url = get_env_collector_endpoint() or f"{scheme}://{host}:{get_env_port()}"
|
|
1207
1232
|
return base_url if base_url.endswith("/") else base_url + "/"
|
|
1208
1233
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import logging
|
|
2
3
|
from collections import defaultdict
|
|
3
4
|
from collections.abc import Mapping
|
|
4
5
|
from dataclasses import asdict
|
|
@@ -54,6 +55,8 @@ ChatCompletionMessage: TypeAlias = tuple[
|
|
|
54
55
|
]
|
|
55
56
|
ToolCallID: TypeAlias = str
|
|
56
57
|
|
|
58
|
+
logger = logging.getLogger(__name__)
|
|
59
|
+
|
|
57
60
|
|
|
58
61
|
class streaming_llm_span:
|
|
59
62
|
"""
|
|
@@ -117,6 +120,7 @@ class streaming_llm_span:
|
|
|
117
120
|
exception_stacktrace=format_exc(),
|
|
118
121
|
)
|
|
119
122
|
)
|
|
123
|
+
logger.exception(exc_value)
|
|
120
124
|
if self._text_chunks or self._tool_call_chunks:
|
|
121
125
|
self._attributes.update(
|
|
122
126
|
chain(
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Authorization dependencies for FastAPI routes.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
Use the provided dependencies (e.g., require_admin) with FastAPI's Depends to restrict access to
|
|
6
|
+
certain routes.
|
|
7
|
+
|
|
8
|
+
These dependencies will raise HTTP 403 if the user is not authorized.
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
|
|
12
|
+
from fastapi import APIRouter, Depends
|
|
13
|
+
from phoenix.server.authorization import require_admin
|
|
14
|
+
|
|
15
|
+
router = APIRouter()
|
|
16
|
+
|
|
17
|
+
@router.post("/dangerous-thing", dependencies=[Depends(require_admin)])
|
|
18
|
+
async def dangerous_thing(...):
|
|
19
|
+
...
|
|
20
|
+
|
|
21
|
+
The require_admin dependency allows only admin or system users to access the route.
|
|
22
|
+
It expects authentication to be enabled and the request.user to be set by the authentication.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from fastapi import HTTPException, Request
|
|
26
|
+
from fastapi import status as fastapi_status
|
|
27
|
+
|
|
28
|
+
from phoenix.server.bearer_auth import PhoenixUser
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def require_admin(request: Request) -> None:
|
|
32
|
+
"""
|
|
33
|
+
FastAPI dependency to restrict access to admin or system users only.
|
|
34
|
+
|
|
35
|
+
Usage:
|
|
36
|
+
Add as a dependency to any route that should only be accessible by admin or system users:
|
|
37
|
+
|
|
38
|
+
@router.post("/dangerous-thing", dependencies=[Depends(require_admin)])
|
|
39
|
+
async def dangerous_thing(...):
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
Behavior:
|
|
43
|
+
- Allows access if the authenticated user is an admin or a system user.
|
|
44
|
+
- Raises HTTP 403 Forbidden if the user is not authorized.
|
|
45
|
+
- Expects authentication to be enabled and request.user to be set by the authentication.
|
|
46
|
+
"""
|
|
47
|
+
user = getattr(request, "user", None)
|
|
48
|
+
# System users have all privileges
|
|
49
|
+
if not (isinstance(user, PhoenixUser) and user.is_admin):
|
|
50
|
+
raise HTTPException(
|
|
51
|
+
status_code=fastapi_status.HTTP_403_FORBIDDEN,
|
|
52
|
+
detail="Only admin or system users can perform this action.",
|
|
53
|
+
)
|
phoenix/server/grpc_server.py
CHANGED
|
@@ -18,6 +18,7 @@ from phoenix.config import (
|
|
|
18
18
|
TLSConfigVerifyClient,
|
|
19
19
|
get_env_grpc_port,
|
|
20
20
|
get_env_tls_config,
|
|
21
|
+
get_env_tls_enabled_for_grpc,
|
|
21
22
|
)
|
|
22
23
|
from phoenix.server.bearer_auth import ApiKeyInterceptor
|
|
23
24
|
from phoenix.trace.otel import decode_otlp_span
|
|
@@ -90,7 +91,8 @@ class GrpcServer:
|
|
|
90
91
|
options=(("grpc.so_reuseport", 0),),
|
|
91
92
|
interceptors=interceptors,
|
|
92
93
|
)
|
|
93
|
-
if
|
|
94
|
+
if get_env_tls_enabled_for_grpc():
|
|
95
|
+
assert (tls_config := get_env_tls_config())
|
|
94
96
|
private_key_certificate_chain_pairs = [(tls_config.key_data, tls_config.cert_data)]
|
|
95
97
|
server_credentials = (
|
|
96
98
|
grpc.ssl_server_credentials(
|
phoenix/server/main.py
CHANGED
|
@@ -42,6 +42,8 @@ from phoenix.config import (
|
|
|
42
42
|
get_env_smtp_username,
|
|
43
43
|
get_env_smtp_validate_certs,
|
|
44
44
|
get_env_tls_config,
|
|
45
|
+
get_env_tls_enabled_for_grpc,
|
|
46
|
+
get_env_tls_enabled_for_http,
|
|
45
47
|
get_pids_path,
|
|
46
48
|
)
|
|
47
49
|
from phoenix.core.model_schema_adapter import create_model_from_inferences
|
|
@@ -101,8 +103,13 @@ _WELCOME_MESSAGE = Environment(loader=BaseLoader()).from_string("""
|
|
|
101
103
|
| 🚀 Phoenix Server 🚀
|
|
102
104
|
| Phoenix UI: {{ ui_path }}
|
|
103
105
|
| Authentication: {{ auth_enabled }}
|
|
104
|
-
{%- if
|
|
105
|
-
|
|
106
|
+
{%- if auth_enabled_for_http or auth_enabled_for_grpc %}
|
|
107
|
+
{%- if tls_enabled_for_http %}
|
|
108
|
+
| TLS: Enabled for HTTP
|
|
109
|
+
{%- endif %}
|
|
110
|
+
{%- if tls_enabled_for_grpc %}
|
|
111
|
+
| TLS: Enabled for gRPC
|
|
112
|
+
{%- endif %}
|
|
106
113
|
{%- if tls_verify_client %}
|
|
107
114
|
| TLS Client Verification: Enabled
|
|
108
115
|
{%- endif %}
|
|
@@ -367,22 +374,25 @@ def main() -> None:
|
|
|
367
374
|
allowed_origins = get_env_allowed_origins()
|
|
368
375
|
|
|
369
376
|
# Get TLS configuration
|
|
377
|
+
tls_enabled_for_http = get_env_tls_enabled_for_http()
|
|
378
|
+
tls_enabled_for_grpc = get_env_tls_enabled_for_grpc()
|
|
370
379
|
tls_config = get_env_tls_config()
|
|
371
|
-
|
|
372
|
-
tls_verify_client = tls_enabled and isinstance(tls_config, TLSConfigVerifyClient)
|
|
380
|
+
tls_verify_client = tls_config is not None and isinstance(tls_config, TLSConfigVerifyClient)
|
|
373
381
|
|
|
374
382
|
# Print information about the server
|
|
375
|
-
|
|
376
|
-
|
|
383
|
+
http_scheme = "https" if tls_enabled_for_http else "http"
|
|
384
|
+
grpc_scheme = "https" if tls_enabled_for_grpc else "http"
|
|
385
|
+
root_path = urljoin(f"{http_scheme}://{host}:{port}", host_root_path)
|
|
377
386
|
msg = _WELCOME_MESSAGE.render(
|
|
378
387
|
version=phoenix_version,
|
|
379
388
|
ui_path=root_path,
|
|
380
|
-
grpc_path=f"{
|
|
389
|
+
grpc_path=f"{grpc_scheme}://{host}:{get_env_grpc_port()}",
|
|
381
390
|
http_path=urljoin(root_path, "v1/traces"),
|
|
382
391
|
storage=get_printable_db_url(db_connection_str),
|
|
383
392
|
schema=get_env_database_schema(),
|
|
384
393
|
auth_enabled=authentication_enabled,
|
|
385
|
-
|
|
394
|
+
tls_enabled_for_http=tls_enabled_for_http,
|
|
395
|
+
tls_enabled_for_grpc=tls_enabled_for_grpc,
|
|
386
396
|
tls_verify_client=tls_verify_client,
|
|
387
397
|
allowed_origins=allowed_origins,
|
|
388
398
|
)
|
|
@@ -444,7 +454,8 @@ def main() -> None:
|
|
|
444
454
|
root_path=host_root_path,
|
|
445
455
|
)
|
|
446
456
|
|
|
447
|
-
if
|
|
457
|
+
if tls_enabled_for_http:
|
|
458
|
+
assert tls_config
|
|
448
459
|
# Configure SSL context with certificate and key
|
|
449
460
|
server_config.ssl_keyfile = str(tls_config.key_file)
|
|
450
461
|
server_config.ssl_keyfile_password = tls_config.key_file_password
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-BypB0fGT.js": {
|
|
3
|
+
"file": "assets/components-BypB0fGT.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-BfhM_F1u.js",
|
|
7
|
-
"_pages-
|
|
7
|
+
"_pages-DGdjQlsy.js",
|
|
8
8
|
"_vendor-arizeai-CxXYQNUl.js",
|
|
9
9
|
"_vendor-codemirror-B0NIFPOL.js",
|
|
10
10
|
"_vendor-three-C5WAXd5r.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-DGdjQlsy.js": {
|
|
14
|
+
"file": "assets/pages-DGdjQlsy.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-BfhM_F1u.js",
|
|
18
18
|
"_vendor-arizeai-CxXYQNUl.js",
|
|
19
|
-
"_components-
|
|
19
|
+
"_components-BypB0fGT.js",
|
|
20
20
|
"_vendor-codemirror-B0NIFPOL.js",
|
|
21
21
|
"_vendor-recharts-CrrDFWK1.js"
|
|
22
22
|
]
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"name": "vendor-three"
|
|
70
70
|
},
|
|
71
71
|
"index.tsx": {
|
|
72
|
-
"file": "assets/index-
|
|
72
|
+
"file": "assets/index-Ccebc6-h.js",
|
|
73
73
|
"name": "index",
|
|
74
74
|
"src": "index.tsx",
|
|
75
75
|
"isEntry": true,
|
|
76
76
|
"imports": [
|
|
77
77
|
"_vendor-BfhM_F1u.js",
|
|
78
78
|
"_vendor-arizeai-CxXYQNUl.js",
|
|
79
|
-
"_pages-
|
|
80
|
-
"_components-
|
|
79
|
+
"_pages-DGdjQlsy.js",
|
|
80
|
+
"_components-BypB0fGT.js",
|
|
81
81
|
"_vendor-three-C5WAXd5r.js",
|
|
82
82
|
"_vendor-codemirror-B0NIFPOL.js",
|
|
83
83
|
"_vendor-shiki-C5bJ-RPf.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,R as U,j as e,u as dn,a as ze,e as r1,s as P1,b as O1,c as Be,d as X1,f as wi,g as Le,h as xi,i as ki,k as Y1,l as s,m as _e,p as b1,n as Xe,o as Ze,q as Si,C as c1,t as Mi,v as Ti,w as N,L as wa,x as xa,y as ka,z as ge,A as C,B as v1,D as un,E as m,F as Sa,$ as zi,G as Ma,H as Ta,I as Ne,J as gn,K as X,M as Ii,N as Ai,O as Ei,P as K,Q as d1,S as O,T as H,U as R,V as za,W as Ia,X as Vi,Y as Aa,Z as Di,_ as Pi,a0 as Oi,a1 as Fi,a2 as _i,a3 as Ni,a4 as Ri,a5 as $i,a6 as Hi,a7 as C1,a8 as Ki,a9 as Bi,aa as Zi,ab as ji,ac as Me,ad as J1,ae as en,af as nn,ag as _,ah as Te,ai as $n,aj as Gi,ak as Ui,al as Ea,am as Wi,an as Qi,ao as qi,ap as Xi,aq as Yi,ar as Ji,as as er,at as nr,au as ar,av as tr,aw as ir,ax as F,ay as mn,az as rr,aA as or,aB as lr,aC as sr,aD as cr,aE as Hn,aF as Ee,aG as Va,aH as dr,aI as Da,aJ as ur,aK as gr,aL as pn,aM as mr,aN as pr,aO as hr,aP as fr,aQ as br,aR as vr,aS as Cr,aT as Kn,aU as yr,aV as Lr,aW as wr,aX as F1,aY as xr,aZ as kr,a_ as Sr,a$ as Mr,b0 as Tr,b1 as zr,b2 as Ir,b3 as Ar,b4 as Er}from"./vendor-BfhM_F1u.js";import{a as Bn,R as Vr,b as Dr,c as Pr,m as Or,T as Fr,u as _r}from"./pages-
|
|
1
|
+
import{r as p,R as U,j as e,u as dn,a as ze,e as r1,s as P1,b as O1,c as Be,d as X1,f as wi,g as Le,h as xi,i as ki,k as Y1,l as s,m as _e,p as b1,n as Xe,o as Ze,q as Si,C as c1,t as Mi,v as Ti,w as N,L as wa,x as xa,y as ka,z as ge,A as C,B as v1,D as un,E as m,F as Sa,$ as zi,G as Ma,H as Ta,I as Ne,J as gn,K as X,M as Ii,N as Ai,O as Ei,P as K,Q as d1,S as O,T as H,U as R,V as za,W as Ia,X as Vi,Y as Aa,Z as Di,_ as Pi,a0 as Oi,a1 as Fi,a2 as _i,a3 as Ni,a4 as Ri,a5 as $i,a6 as Hi,a7 as C1,a8 as Ki,a9 as Bi,aa as Zi,ab as ji,ac as Me,ad as J1,ae as en,af as nn,ag as _,ah as Te,ai as $n,aj as Gi,ak as Ui,al as Ea,am as Wi,an as Qi,ao as qi,ap as Xi,aq as Yi,ar as Ji,as as er,at as nr,au as ar,av as tr,aw as ir,ax as F,ay as mn,az as rr,aA as or,aB as lr,aC as sr,aD as cr,aE as Hn,aF as Ee,aG as Va,aH as dr,aI as Da,aJ as ur,aK as gr,aL as pn,aM as mr,aN as pr,aO as hr,aP as fr,aQ as br,aR as vr,aS as Cr,aT as Kn,aU as yr,aV as Lr,aW as wr,aX as F1,aY as xr,aZ as kr,a_ as Sr,a$ as Mr,b0 as Tr,b1 as zr,b2 as Ir,b3 as Ar,b4 as Er}from"./vendor-BfhM_F1u.js";import{a as Bn,R as Vr,b as Dr,c as Pr,m as Or,T as Fr,u as _r}from"./pages-DGdjQlsy.js";import{u as Nr,_ as Pa,a as he,T as le,E as Oa,b as Re,c as fe,d as Rr,D as y1,e as $r,f as ue,g as Hr,C as Fa,P as hn,h as _a,i as Kr,F as Na,I as Br,j as Zr,k as jr,l as Gr,m as Ur,n as Wr,o as Qr,p as qr,q as Ra,r as $a,s as Xr,t as Yr}from"./vendor-arizeai-CxXYQNUl.js";import{L as Ha,a as Ka,d as Ue,E as fn,k as Ba,b as Za,l as an,h as Jr,j as eo,c as no,e as ao,f as to,s as io,g as Ye,i as Je,R as e1,p as ro,m as oo}from"./vendor-codemirror-B0NIFPOL.js";import{V as lo}from"./vendor-three-C5WAXd5r.js";const ja=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},a={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},o=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],l=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:o,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:o,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,t,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:l,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,t,a,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:l},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
|
|
2
2
|
$clusters: [ClusterInput!]!
|
|
3
3
|
$fetchDataQualityMetric: Boolean!
|
|
4
4
|
$dataQualityMetricColumnName: String
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,j as o,bp as z,l as c,P as w,R as P,E as b,cx as k,ei as S,ej as F,ek as L,bF as C,el as l,w as E,em as R}from"./vendor-BfhM_F1u.js";import{c as I,x as j,D as A,K as T,M as _}from"./vendor-arizeai-CxXYQNUl.js";import{L as D,r as O,d as G,e as M,F as N,f as V,P as q,h as K,M as m,g as U,D as W,i as B,E as H,j as J,k as Y,p as $,l as X,n as p,o as Z,q as Q,s as oo,S as lo,t as ao,v as ro,w as co,x as go,y as eo,z as bo,A as u,B as f,C as y,G as no,H as io,I as so,J as to,K as mo,N as po,O as uo,Q as fo,U as yo,V as vo,W as ho,X as xo,Y as zo,Z as wo,_ as Po,$ as ko,a0 as So,a1 as Fo,a2 as Lo,a3 as Co,a4 as Eo,a5 as Ro,a6 as Io,a7 as jo,a8 as Ao,a9 as To,aa as _o,ab as Do,ac as Oo,ad as Go,ae as Mo,af as No,ag as Vo,ah as qo}from"./pages-
|
|
1
|
+
import{r as t,j as o,bp as z,l as c,P as w,R as P,E as b,cx as k,ei as S,ej as F,ek as L,bF as C,el as l,w as E,em as R}from"./vendor-BfhM_F1u.js";import{c as I,x as j,D as A,K as T,M as _}from"./vendor-arizeai-CxXYQNUl.js";import{L as D,r as O,d as G,e as M,F as N,f as V,P as q,h as K,M as m,g as U,D as W,i as B,E as H,j as J,k as Y,p as $,l as X,n as p,o as Z,q as Q,s as oo,S as lo,t as ao,v as ro,w as co,x as go,y as eo,z as bo,A as u,B as f,C as y,G as no,H as io,I as so,J as to,K as mo,N as po,O as uo,Q as fo,U as yo,V as vo,W as ho,X as xo,Y as zo,Z as wo,_ as Po,$ as ko,a0 as So,a1 as Fo,a2 as Lo,a3 as Co,a4 as Eo,a5 as Ro,a6 as Io,a7 as jo,a8 as Ao,a9 as To,aa as _o,ab as Do,ac as Oo,ad as Go,ae as Mo,af as No,ag as Vo,ah as qo}from"./pages-DGdjQlsy.js";import{z as Ko,dX as Uo,bH as Wo,R as Bo,dY as Ho,dZ as Jo}from"./components-BypB0fGT.js";import"./vendor-three-C5WAXd5r.js";import"./vendor-codemirror-B0NIFPOL.js";import"./vendor-shiki-C5bJ-RPf.js";import"./vendor-recharts-CrrDFWK1.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const g of r)if(g.type==="childList")for(const n of g.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&s(n)}).observe(document,{childList:!0,subtree:!0});function i(r){const g={};return r.integrity&&(g.integrity=r.integrity),r.referrerPolicy&&(g.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?g.credentials="include":r.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function s(r){if(r.ep)return;r.ep=!0;const g=i(r);fetch(r.href,g)}})();const v="arize-phoenix-feature-flags",d={__RESET__:!1};function Yo(){const a=localStorage.getItem(v);if(!a)return d;try{const e=JSON.parse(a);return Object.assign({},d,e)}catch{return d}}const h=t.createContext(null);function $o(){const a=P.useContext(h);if(a===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return a}function Xo(a){const[e,i]=t.useState(Yo()),s=r=>{localStorage.setItem(v,JSON.stringify(r)),i(r)};return o(h.Provider,{value:{featureFlags:e,setFeatureFlags:s},children:o(Zo,{children:a.children})})}function Zo(a){const{children:e}=a,{featureFlags:i,setFeatureFlags:s}=$o(),[r,g]=t.useState(!1);return z("ctrl+shift+f",()=>g(!0)),c(w,{children:[e,o(A,{type:"modal",isDismissable:!0,onDismiss:()=>g(!1),children:r&&o(I,{title:"Feature Flags",children:o(Ko,{height:"size-1000",padding:"size-100",children:Object.keys(i).map(n=>o(j,{isSelected:i[n],onChange:x=>s({...i,[n]:x}),children:n},n))})})})]})}const Qo=b`
|
|
2
2
|
:root {
|
|
3
3
|
--ac-global-dimension-scale-factor: 1;
|
|
4
4
|
--ac-global-dimension-size-0: 0px;
|