Sessions

A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release. Most Sentry SDKs can manage sessions automatically.

We create a session for every request and response cycle, and mark the session as:

  • crashed if an unhandled error is raised.
  • an error if the SDK captures an event that contains an exception (this includes manually captured errors).

Currently, web socket connections don't create sessions.

By default, the Python SDK sends sessions. To disable sending sessions, set the auto_session_tracking flag to False:

Copied
import sentry_sdk

sentry_sdk.init(
    # ...

    auto_session_tracking=False,
)

Sessions are used to monitor the health of releases by observing user adoption, usage of the application, percentage of crashes, and session data. Release health will provide insight into the impact of crashes and bugs as it relates to user experience, and reveal trends with each new issue through the Release Details graphs and filters.

In order to monitor release health, you need to set a release.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").