getsentry / getsentry/sentry-java

Add Fragment Transactions

Open
#3,719 4 comments 4 reactions 1 assignee Claimed by @markushi View on GitHub
Android Feature Spans
Dominant language
Kotlin
Stars
1.4k
Forks
478
Avg merge
2d 23h
Merged PRs (30d)
67

Description

### Description

In the light of #1810, we're still not really there yet with the Manual Screens API and only-spans, so this might be a interim solution to support single-activity apps and create transactions bound to scope automatically for our fragment integration. This has several tricky things to figure out:
- What is considered a screen when fragments are used?
- If androidx.navigation is used we could use our integration to create transaction whenever a route changes
- otherwise we could by default always create transaction and then provide a lambda/function to customize this behavior (e.g. `shouldCreateTx: (Fragment) -> Boolean`
- If there's an active Activity transaction, should we keep it or should we replace it with the Fragment one?
- I think we should keep it and make the fragment integration create a span instead
- Should inherit most of the behavior from the ActivityLifecycleIntegration, so it would makes sense to commonize that code
- TTID/TTFD
- ...
- ViewPager?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.