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

[Bug]: Prevent blocking on start_session and end_session #535

Open
1 of 3 tasks
areibman opened this issue Nov 26, 2024 · 0 comments
Open
1 of 3 tasks

[Bug]: Prevent blocking on start_session and end_session #535

areibman opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@areibman
Copy link
Contributor

Contact Details

No response

πŸ“¦ Package Version

0.3.18

🎞️ Framework Version

No response

πŸ”Ž Describe the Bug

Currently, start_session and end_session are blocking on the main thread. This is because start_session fetches a JWT which can take some time. We can move this to agentops.init to speed things up.

Additionally, end_session runs a flush. We can probably make this more of a "fire and forget" style signal. That is, when the SessionExporter sees an end_session event, it doesn't need to trigger a flush. We can just reserve the flush for SIGINT and program exit.

🀝 Contribution

  • Yes, I'd be happy to submit a pull request with these changes.
  • I need some guidance on how to contribute.
  • I'd prefer the AgentOps team to handle this update.
@areibman areibman added the bug Something isn't working label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant