Is there any reason not to treat Phoenix projects as ephemeral units of organization? My use case is to run some code that will generate traces and use the with using_project: context manager so that it鈥檚 easy to get the resulting traces (spans = client.get_spans_dataframe(project_name=project_name) ) and then create a data set with them. Then I would delete the project to keep things tidy. Does this seem like a reasonable workflow? The goal is to programmatically generate traces, create a dataset, and run an experiment all in one go.
Using Phoenix projects as ephemeral units of organization is a reasonable workflow, especially if your goal is to programmatically generate traces, extract them, and then clean up by deleting the project. The using_project context manager allows you to temporarily switch projects, making it easy to organize and retrieve traces for specific tasks or experiments. This approach can help maintain a tidy environment by ensuring that only relevant and current data is stored.However, keep in mind that Phoenix does not support dynamically changing the project after it has been set, except in a notebook environment where the using_project context manager can be used, as noted in this GitHub issue. Additionally, while you can delete projects to keep things tidy, ensure that any necessary data is backed up or exported before deletion, as this action is irreversible.Would you like more details on any specific part of this setup?Sources:
- GitHub Issue #3207
- Phoenix Tracing Setup
馃挕聽Hint: Mention RunLLM in the thread for followups.
I think this comment is outdated since I was able to use with using_project: outside of a notebook env
Hi Andrew, while the context manager works in many cases outside of notebook environments, it temporarily patches the source attributes of a trace, which isn鈥檛 really the intent of how to use that attribute in production
is there a better way to change the project name that doesn鈥檛 require restarting the env with a different env var?
Unfortunately there isn鈥檛 a direct way because opentelemetry does not allow the easy modification of the source once it鈥檚 been set :(
