Skip to content

SentryFragmentLifecycleCallbacks creates long running spans for ViewPager2 #3269

Description

@markushi

Integration

sentry-android

Build System

Gradle

AGP Version

unknown

Proguard

Enabled

Version

unknown

Steps to Reproduce

  1. Use ViewPager2
  2. Enable performance and our FragmentLifecycleIntegration

Expected Result

No span is created for non-visible fragments.

Actual Result

A span is created, but due to this:

non-primary-item Fragments are capped at STARTED

the spans end up running into an timeout, causing extra long transaction durations.

We probably should be using getUserVisibleHint() or getMinimumMaxLifecycleState() to determine Fragments which won't be activated.

┆Issue is synchronized with this Jira Improvement by Unito

Metadata

Metadata

Assignees

Labels

BugIssue type

Projects

Status
No status
Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions