-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat(release-health): Enable session tracking by default #994
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do have one concern, since we default to application
mode, which means no pre-aggregation, currently the auto_session_tracking
resource manager only checks for the auto_session_tracking flag, but not for the mode.
Why is this relevant: The wsgi integration does auto_session_tracking, so if someone has not correctly configured the SDK, that integration will generate tons of individual session updates.
second concern is around application mode sessions: currently there is no code that starts/stops one. what I think is missing is actually calling |
Do we need this flag? I thought we might be able to auto detect within the integration. Is that not the case? |
I am assuming you are talking about the auto_session_tracking flag, right? And in that case, I am not entirely sure but it seems like it relies on the options passed on init? and in regards to the session_mode that @Swatinem is referring to, afaik it is auto-detected in Rust but doesn't seem like it is in Python Am I missing something here? |
…-enable-session-tracking
…uest in WSGI handler
…entry-python into auto-enable-session-tracking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
Interestingly, sentry has just hit 1.0.0! None of the nominally breaking changes[1] look relevant to our minimal usage: > - Feat: Moved auto_session_tracking experimental flag to a proper > option and removed session_mode, hence enabling release health by > default getsentry/sentry-python#994 > > - Fixed Django transaction name by setting the name to > request.path_info rather than request.path > > - Fix for tracing by getting HTTP headers from span rather than > transaction when possible getsentry/sentry-python#1035 > > - Fix for Flask transactions missing request body in non errored > transactions getsentry/sentry-python#1034 > > - Fix for honoring the X-Forwarded-For header getsentry/sentry-python#1037 > > - Fix for worker that logs data dropping of events with level error > getsentry/sentry-python#1032 [1] https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md
Sadly I couldn't find any documentation about what this auto session tracking actually is so I'm a bit afraid of upgrading to the latest Sentry SDK. What exactly is this feature? |
@levrik this feature tracks Release Health by sending session updates with healthy/unhealthy counts. |
Hello! We recently made a big upgrade from <1.0 to 1.5.7 and I believe we ran into an issue related to this—from APM, it looks like sessions were being updated frequently, which was causing some performance issues downstream, I believe due to You mentioned:
Can you clarify the misconfiguration here? Is it an incorrect Thank you! UPDATE: |
This PR adds session tracking by default, through removing
auto_session_tracking
from experimental options to proper ones withsession_mode
defaulting toapplication
but then switches torequest
in the middlewareChanges:
session_mode
from SessionFlusher (sessions.py
) to Session (session.py
)Hub.start_session
takes asession_mode
that defaults toapplication
auto_session_tracking
context manager takes an optionalsession_mode
auto_session_tracking
experimental flag to a proper option that defaults toTrue
session_mode
experimental option