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
This commit is contained in:
GareArc 2026-02-04 21:27:16 -08:00
parent 5bbc938a0d
commit 80ee2e982e
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -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: