Skip to content
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: Add support for pre-aggregated Sessions #284

Merged
merged 4 commits into from
Jan 20, 2021
Merged

Conversation

Swatinem
Copy link
Member

This should work together with getsentry/relay#815

@@ -91,6 +116,8 @@ pub struct ClientOptions {
/// is started at the time of `sentry::init`, and will persist for the
/// application lifetime.
pub auto_session_tracking: bool,
/// Determine how Sessions are being tracked.
pub session_mode: SessionMode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we consider combining this with the session tracking flag into a session_mode: Application | Request | Off?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this a bit, and a tri-state would not work when you don’t want to have auto-tracking, but want to manually track request-mode sessions.

Also related to your other question: Request-Mode applies to all sessions, I updated the doc comment to accordingly. So choosing between application/request-mode basically means that you make a choice if you want aggregation at the cost of losing durations, or not.

@jan-auer jan-auer marked this pull request as ready for review November 30, 2020 17:37
Adds a new `session_mode` option that can be set to pre-aggregate
sessions before they are sent upstream. This will allow efficient server
applications that can produce thousands of session updates per second.
@Swatinem Swatinem merged commit 3503cee into master Jan 20, 2021
@Swatinem Swatinem deleted the feat/aggregates branch January 20, 2021 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants