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

Auto enable Sessions for non-WSGI frameworks #1162

Closed
3 tasks
rhcarvalho opened this issue Aug 13, 2021 · 2 comments
Closed
3 tasks

Auto enable Sessions for non-WSGI frameworks #1162

rhcarvalho opened this issue Aug 13, 2021 · 2 comments
Labels
Component: Docs updates on getsentry/docs or docstrings

Comments

@rhcarvalho
Copy link
Contributor

rhcarvalho commented Aug 13, 2021

In #994 the SDK was changed such that the WSGI integration and all frameworks that inherit from it have "request-mode" sessions on by default.

However, despite the default auto_session_tracking=True init option, session tracking is not enabled for anything outside of the WSGI realm.

Missing:

  • Automatic "application-mode" session for non-Web-servers applications
  • Automatic session for non-WSGI integrations (e.g., Django and ASGI)

These are also missing but probably should actually disable sessions altogether (and have accompanying documentation):

  • Queue consumers (e.g., Celery and RQ) ⇒ it is unclear doing 1 session per queue item is justified, there is no industry precedence on this to set user expectations

  • Serverless (e.g., AWS Lambda and Google Cloud Functions) ⇒ considering that the current implementation requires a separate request to send a session update, this would require a minimum of 2 requests per cloud function invocation (1 for transaction and 1 for session) which would be highly inefficient.

  • We need to document what auto_session_tracking enables, clarifying what the behavior is.

@rhcarvalho rhcarvalho added bug Component: Docs updates on getsentry/docs or docstrings labels Aug 13, 2021
@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@antonpirker
Copy link
Member

We started a wider discussion about this inside Sentry. For now this is closed here, because it also involves other SDKs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Docs updates on getsentry/docs or docstrings
Projects
None yet
Development

No branches or pull requests

4 participants