arize-phoenix 11.5.0__py3-none-any.whl → 11.6.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-11.5.0.dist-info → arize_phoenix-11.6.0.dist-info}/METADATA +1 -1
- {arize_phoenix-11.5.0.dist-info → arize_phoenix-11.6.0.dist-info}/RECORD +19 -19
- phoenix/server/api/queries.py +21 -25
- phoenix/server/api/routers/v1/spans.py +2 -2
- phoenix/server/api/types/Span.py +0 -99
- phoenix/server/app.py +6 -10
- phoenix/server/cost_tracking/cost_model_lookup.py +1 -1
- phoenix/server/cost_tracking/model_cost_manifest.json +107 -107
- phoenix/server/daemons/db_disk_usage_monitor.py +11 -5
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-Bwf6zNbg.js → components-mOUBHJ12.js} +294 -294
- phoenix/server/static/assets/{index-Bfg9uQ43.js → index-CQ_A6K_M.js} +2 -2
- phoenix/server/static/assets/{pages-BCR8hW_l.js → pages-CCsLkNZY.js} +496 -482
- phoenix/server/types.py +4 -2
- phoenix/version.py +1 -1
- {arize_phoenix-11.5.0.dist-info → arize_phoenix-11.6.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-11.5.0.dist-info → arize_phoenix-11.6.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-11.5.0.dist-info → arize_phoenix-11.6.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-11.5.0.dist-info → arize_phoenix-11.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,9 +11,11 @@ from sqlalchemy import text
|
|
|
11
11
|
from typing_extensions import assert_never
|
|
12
12
|
|
|
13
13
|
from phoenix.config import (
|
|
14
|
+
ENV_PHOENIX_SQL_DATABASE_SCHEMA,
|
|
14
15
|
get_env_database_allocated_storage_capacity_gibibytes,
|
|
15
16
|
get_env_database_usage_email_warning_threshold_percentage,
|
|
16
17
|
get_env_database_usage_insertion_blocking_threshold_percentage,
|
|
18
|
+
getenv,
|
|
17
19
|
)
|
|
18
20
|
from phoenix.db import models
|
|
19
21
|
from phoenix.db.helpers import SupportedSQLDialect
|
|
@@ -92,14 +94,18 @@ class DbDiskUsageMonitor(DaemonTask):
|
|
|
92
94
|
page_size = await session.scalar(text("PRAGMA page_size;"))
|
|
93
95
|
current_usage_bytes = (page_count - freelist_count) * page_size
|
|
94
96
|
elif self._db.dialect is SupportedSQLDialect.POSTGRESQL:
|
|
97
|
+
nspname = getenv(ENV_PHOENIX_SQL_DATABASE_SCHEMA) or "public"
|
|
98
|
+
stmt = text("""\
|
|
99
|
+
SELECT sum(pg_total_relation_size(c.oid))
|
|
100
|
+
FROM pg_class as c
|
|
101
|
+
INNER JOIN pg_namespace as n ON n.oid = c.relnamespace
|
|
102
|
+
WHERE c.relkind = 'r'
|
|
103
|
+
AND n.nspname = :nspname;
|
|
104
|
+
""").bindparams(nspname=nspname)
|
|
95
105
|
async with self._db() as session:
|
|
96
|
-
current_usage_bytes = await session.scalar(
|
|
97
|
-
text("SELECT pg_database_size(current_database());")
|
|
98
|
-
)
|
|
106
|
+
current_usage_bytes = await session.scalar(stmt)
|
|
99
107
|
else:
|
|
100
108
|
assert_never(self._db.dialect)
|
|
101
|
-
if not isinstance(current_usage_bytes, (int, float)):
|
|
102
|
-
raise TypeError(f"Expected int or float, got {type(current_usage_bytes)}")
|
|
103
109
|
return float(current_usage_bytes)
|
|
104
110
|
|
|
105
111
|
async def _check_thresholds(self, current_usage_gibibytes: float) -> None:
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-mOUBHJ12.js": {
|
|
3
|
+
"file": "assets/components-mOUBHJ12.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-DRWIRkSJ.js",
|
|
7
|
-
"_pages-
|
|
7
|
+
"_pages-CCsLkNZY.js",
|
|
8
8
|
"_vendor-arizeai-DUhQaeau.js",
|
|
9
9
|
"_vendor-codemirror-D_6Q6Auv.js",
|
|
10
10
|
"_vendor-three-C5WAXd5r.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-CCsLkNZY.js": {
|
|
14
|
+
"file": "assets/pages-CCsLkNZY.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-DRWIRkSJ.js",
|
|
18
18
|
"_vendor-arizeai-DUhQaeau.js",
|
|
19
|
-
"_components-
|
|
19
|
+
"_components-mOUBHJ12.js",
|
|
20
20
|
"_vendor-codemirror-D_6Q6Auv.js",
|
|
21
21
|
"_vendor-recharts-BNBwj7vz.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-CQ_A6K_M.js",
|
|
73
73
|
"name": "index",
|
|
74
74
|
"src": "index.tsx",
|
|
75
75
|
"isEntry": true,
|
|
76
76
|
"imports": [
|
|
77
77
|
"_vendor-DRWIRkSJ.js",
|
|
78
78
|
"_vendor-arizeai-DUhQaeau.js",
|
|
79
|
-
"_pages-
|
|
80
|
-
"_components-
|
|
79
|
+
"_pages-CCsLkNZY.js",
|
|
80
|
+
"_components-mOUBHJ12.js",
|
|
81
81
|
"_vendor-three-C5WAXd5r.js",
|
|
82
82
|
"_vendor-codemirror-D_6Q6Auv.js",
|
|
83
83
|
"_vendor-shiki-k1qj_XjP.js",
|