Arize-ai / phoenix

AI Observability & Evaluation
https://docs.arize.com/phoenix
Other
3.79k stars 281 forks source link

[ENHANCEMENT] Configure schema that Phoenix logs to when persisting to DB #4212

Closed Bruenia closed 1 month ago

Bruenia commented 2 months ago

Is your feature request related to a problem? Please describe. As an engineer, I often want to cross-reference logs from Phoenix with other data or logs. The easiest way to do this would be to store all relevant information in the same database. However, Phoenix currently only supports logging to the public schema and this cannot be change. This can lead to conflicts when utilizing other services and discourages best practices for DB administration.

Describe the solution you'd like An environment variable such as PHOENIX_SCHEMA that allows us to specify the schema Phoenix uses. Alternately, logging to an identifiable schema name like phoenix by default

Describe alternatives you've considered I've considered using multiple databases but that is unwieldy and requires data replication. I've also considered running jobs on schedule to write data to another schema, this is still on the table as I consider how to structure metadata for immediate querying.

mikeldking commented 2 months ago

Thanks for the issue @Bruenia - makes sense.

RogerHYang commented 1 month ago

@Bruenia We added PHOENIX_SQL_DATABASE_SCHEMA for this purpose in v4.33.0. Please give it a try and let us know if you encounter additional issues. Thanks!