Skip to content

Document manual session tracking #1461

Open
@antonpirker

Description

@antonpirker

Problem Statement

If you have a non WSGI/ASGI project than there is no automatic session tracking.
But one can easily add session tracking by hand like this:

from sentry_sdk.hub import Hub
from sentry_sdk.sessions import auto_session_tracking

hub = Hub(Hub.current)
with auto_session_tracking(hub):
   # all the code that belong to one session goes here.

Solution Brainstorm

This should be somewhere in the documentation, so that people can add session tracking to their projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsHelp wantedExtra attention is neededPythonSDKTriagedHas been looked at recently during old issue triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions