getsentry / getsentry/sentry-python

Document manual session tracking

Open
#1,461 7 comments 2 reactions 0 assignees View on GitHub
Docs good first issue Help Wanted Python
Dominant language
Python
Stars
2.2k
Forks
669
Avg merge
1d 1h
Merged PRs (30d)
213

Description

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.