Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: db table for trace data retention policies #6703

Merged
merged 4 commits into from
Mar 25, 2025

Conversation

RogerHYang
Copy link
Contributor

@RogerHYang RogerHYang commented Mar 5, 2025

resolves #6611
resolves #6594

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 5, 2025
Copy link
Contributor

@axiomofjoy axiomofjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work here Roger.

Main question I have is I'm not grokking the need for the active column if the foreign key relation onto the trace retention policies table is nullable.

),
)
op.create_index(
"ix_projects_trace_retention_policy_id",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tricky that we have to manually specify the index name in the migration. Is there a way to use the same auto-generated name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately I have not been able to get the batch_op to work without doing it this way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the expected behavior is that the env var only takes effect the very first time Phoenix is deployed, and afterward, the default retention period is locked in forever?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, that's right. We don't want to change it based on the env var anymore because user could have changed it in the UI already also

@RogerHYang
Copy link
Contributor Author

Main question I have is I'm not grokking the need for the active column if the foreign key relation onto the trace retention policies table is nullable.

@axiomofjoy This is to disable the sweeper (i.e. keeping it dormant) for people who don't realize this has become a new feature and expect to store their spans forever. In other words, the status quo is no sweeping, so we need to keep it that way.

@RogerHYang RogerHYang linked an issue Mar 17, 2025 that may be closed by this pull request
@RogerHYang RogerHYang force-pushed the time-based-trace-retention branch from 20fd39e to 394f665 Compare March 21, 2025 15:44
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

pkg-pr-new bot commented Mar 21, 2025

Open in Stackblitz

npm i https://pkg.pr.new/Arize-ai/phoenix/@arizeai/phoenix-client@6703

commit: 394f665

@RogerHYang RogerHYang changed the base branch from trace-data-retention to feat/annotations March 21, 2025 15:46
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Mar 21, 2025
@RogerHYang RogerHYang changed the title feat: time based trace data retention policies feat: db table for trace data retention policies Mar 21, 2025
@RogerHYang RogerHYang changed the title feat: db table for trace data retention policies feat!: db table for trace data retention policies Mar 21, 2025
@RogerHYang RogerHYang linked an issue Mar 21, 2025 that may be closed by this pull request
@RogerHYang RogerHYang merged commit b64e515 into feat/annotations Mar 25, 2025
52 checks passed
@RogerHYang RogerHYang deleted the time-based-trace-retention branch March 25, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
2 participants