Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

Unity SDK integrations pause and resume sessions in response to lifecycle events without knowing if a session is active. This causes repeated warnings from GlobalSessionManager ("Attempted to pause/resume a session, but a session has not been started") with no way for integrations to prevent them.

_options.LogWarning("Attempted to resume a session, but a session has not been started.");

This PR adds IHub.IsSessionActive to allow checking session state before pause/resume operations. This also gives users insights into whether there currently is a session active. I don't know how else they are supposed to deal any manual session handling anyway.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 5a11ac5

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (version6@8561566). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/Sentry/Extensibility/DisabledHub.cs 0.00% 1 Missing ⚠️
src/Sentry/Extensibility/HubAdapter.cs 0.00% 1 Missing ⚠️
src/Sentry/Internal/Hub.cs 0.00% 1 Missing ⚠️
src/Sentry/SentrySdk.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             version6    #4662   +/-   ##
===========================================
  Coverage            ?   73.22%           
===========================================
  Files               ?      480           
  Lines               ?    17403           
  Branches            ?     3436           
===========================================
  Hits                ?    12743           
  Misses              ?     3810           
  Partials            ?      850           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from feat/cache-unhandled-session to version6 October 29, 2025 14:47
@bitsandfoxes bitsandfoxes merged commit cde2961 into version6 Oct 29, 2025
30 checks passed
@bitsandfoxes bitsandfoxes deleted the feat/active-session branch October 29, 2025 16:01
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.

4 participants