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(sessions): Remove deprecated functions #3424

Closed

Conversation

szokeasaurusrex
Copy link
Member

Remove the deprecated functions from sessions.py (this includes all Hub-based logic) and all tests for these functions.

BREAKING CHANGE: Remove sentry_sdk.sessions.auto_session_tracking.

BREAKING CHANGE: Remove sentry_sdk.sessions.is_auto_session_tracking_enabled.

BREAKING CHANGE: Remove sentry_sdk.sessions.is_auto_session_tracking_enabled_scope.

BREAKING CHANGE: Remove sentry_sdk.sessions.is_auto_session_tracking_enabled_scope.

Closes: #3416

@szokeasaurusrex
Copy link
Member Author

szokeasaurusrex commented Aug 9, 2024

Note to reviewers: Please focus your review on ef1bc38, the other two commits are cherry picks (first one is already in master, second one is from #3419)

@szokeasaurusrex szokeasaurusrex linked an issue Aug 9, 2024 that may be closed by this pull request
Copy link

codecov bot commented Aug 9, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 13513 tests with 1 failed, 11785 passed and 1727 skipped.

View the full list of failed tests

py3.8-gevent

  • Class name: tests.profiler.test_continuous_profiler
    Test name: test_continuous_profiler_auto_start_and_manual_stop[experiment-gevent]

    tests/profiler/test_continuous_profiler.py:204: in test_continuous_profiler_auto_start_and_manual_stop
    assert_single_transaction_with_profile_chunks(envelopes, thread)
    tests/profiler/test_continuous_profiler.py:110: in assert_single_transaction_with_profile_chunks
    assert len(items["profile_chunk"]) > 0
    E assert 0 > 0
    E + where 0 = len([])

sentrivana
sentrivana previously approved these changes Aug 9, 2024
@sentrivana sentrivana dismissed their stale review August 9, 2024 10:06

Will have to re-review this after looking at the prereq PR -- didn't realize these functions are not deprecated atm.

@sentrivana sentrivana self-requested a review August 9, 2024 10:07
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

See my comment in #3419

szokeasaurusrex and others added 3 commits August 9, 2024 14:57
Deprecate the Hub-based `is_auto_session_tracking_enabled` and the Scope-based `is_auto_session_tracking_enabled_scope`, and replace them with a new Scope-based private-API equivalent.

Partially implements #3417
Make several changes to prepare for fully removing Hubs in the next major:
  - Deprecate the Hub-based `auto_session_tracking` function, replacing it with a new Scope-based function called `track_session`
  - Deprecate the scope-based `auto_session_tracking_scope` in favor of the new `track_session` function
  - Change usages of `auto_session_tracking_scope` to `track_sessions`. There are no usages of `auto_session_tracking` outside of tests.
  - Run all tests that were previously run against `auto_session_tracking` also against the new `track_session`. Previously, `auto_session_tracking_scope` was completely untested.

Fixes #3417
Remove the deprecated functions from `sessions.py` (this includes all Hub-based logic) and all tests for these functions.

BREAKING CHANGE: Remove `sentry_sdk.sessions.auto_session_tracking`.

BREAKING CHANGE: Remove `sentry_sdk.sessions.is_auto_session_tracking_enabled`.

BREAKING CHANGE: Remove `sentry_sdk.sessions.is_auto_session_tracking_enabled_scope`.

BREAKING CHANGE: Remove `sentry_sdk.sessions.is_auto_session_tracking_enabled_scope`.

Closes: #3416
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/remove-hub-sessions branch from 85cb6d0 to ef1bc38 Compare August 9, 2024 13:00
@antonpirker
Copy link
Member

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.

Remove hub from sessions.py
3 participants