From 80ee2e982e0350361c541048a98737d312928366 Mon Sep 17 00:00:00 2001 From: GareArc Date: Wed, 4 Feb 2026 21:27:16 -0800 Subject: [PATCH] fix(telemetry): prevent UUID validation error for tenant-prefixed storage IDs - get_ops_trace_instance was trying to query App table with storage_id format "tenant-{uuid}" - This caused psycopg2.errors.InvalidTextRepresentation when app_id is None - Added early return for tenant-prefixed storage identifiers to skip App lookup - Enterprise telemetry still works correctly with these storage IDs --- api/core/ops/ops_trace_manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/core/ops/ops_trace_manager.py b/api/core/ops/ops_trace_manager.py index efeea1ee11..f405191b67 100644 --- a/api/core/ops/ops_trace_manager.py +++ b/api/core/ops/ops_trace_manager.py @@ -361,6 +361,10 @@ class OpsTraceManager: if app_id is None: return None + # Handle storage_id format (tenant-{uuid}) - not a real app_id + if isinstance(app_id, str) and app_id.startswith("tenant-"): + return None + app: App | None = db.session.query(App).where(App.id == app_id).first() if app is None: