GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Support pre-aggregated sessions by Swatinem · Pull Request #985 · getsentry/sentry-python

Conversation

@Swatinem

@Swatinem Swatinem commented Jan 21, 2021

Copy link
Copy Markdown
Contributor

This changes the SessionFlusher to pre-aggregate sessions according to https://develop.sentry.dev/sdk/sessions/#session-aggregates-payload instead of sending individual session updates.

The current implementation will always aggregate sessions, as the SDK currently lacks the possibility to chose between application-mode or request-mode sessions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mitsuhiko and others added 6 commits January 19, 2021 15:40
@mitsuhiko
wip: session stuff
a5a81bc
@Swatinem
make things work with aggregates
0380d79
sentry-bot
fix: Formatting
c23f4ea
@Swatinem
introduce an explicit session_mode setting
ebcd3b7
@Swatinem
Merge branch 'master' into feature/session-stuff
d5b0571
@Swatinem
make linters happy
1783c93
@Swatinem
Swatinem marked this pull request as ready for review January 28, 2021 11:17
@Swatinem
Swatinem requested a review from mitsuhiko February 3, 2021 11:53
mitsuhiko
mitsuhiko approved these changes Feb 3, 2021
View reviewed changes
@mitsuhiko

mitsuhiko commented Feb 3, 2021

Copy link
Copy Markdown
Contributor

Looking good

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Swatinem
Swatinem merged commit 7ba60bd into master Feb 3, 2021
@Swatinem
Swatinem deleted the feature/session-stuff branch February 3, 2021 20:44
@sentry-junior sentry-junior Bot mentioned this pull request Oct 29, 2026
ref(sessions): Remove unused TERMINAL_SESSION_STATES constant #8151
Merged
sentrivana added a commit that referenced this pull request Oct 29, 2026
@sentry-junior @sentrivana
ref(sessions): Remove unused TERMINAL_SESSION_STATES constant (#8151)
7ad4e1a
### Description

Removes the module-level `TERMINAL_SESSION_STATES` tuple from
`sentry_sdk/sessions.py`. It has never been read anywhere.

#627 (Mar 2020) added it with the original session tracking code, and
#985 (Feb 2021) moved it a few lines down. Neither change, nor any other
commit, added a use of it. Session status handling (`Session.close()`,
`SessionFlusher` aggregation) compares against the status literals
directly.

**Evidence**
- `git grep TERMINAL_SESSION_STATES` across the whole repo matches only
the definition.
- `git log -G TERMINAL_SESSION_STATES` shows only #627 (added) and #985
(moved).
- No open PR or issue mentions it.

**Why it's safe**
- It's a plain constant in an internal module. It's not re-exported from
`sentry_sdk` and doesn't appear in `docs/`, `CHANGELOG.md` or
`MIGRATION_GUIDE.md`.
- It was never read at runtime, so behavior doesn't change.

#### Issues
n/a

<!-- junior-request-attribution:start -->
via **Ivana Kellyer**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0BTREZTS2Z%3A1793270559.842119 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0BTREZTS2Z%3A1793270559.842119)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0BTREZTS2Z%3A1793270559.842119/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Ivana Kellyer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@mitsuhiko mitsuhiko mitsuhiko approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Swatinem @mitsuhiko
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.