-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add fragment breadcrumb data source #491
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #491 +/- ##
==========================================
- Coverage 79.33% 79.29% -0.04%
==========================================
Files 389 390 +1
Lines 10722 10752 +30
Branches 1594 1599 +5
==========================================
+ Hits 8506 8526 +20
- Misses 1577 1580 +3
- Partials 639 646 +7
|
e88aec2
to
6a61b7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
@Test | ||
fun `end an unknown fragment`() { | ||
dataSource.endFragment("my_fragment") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to validate that this returns false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an extra assertion here
* by [RemoteConfig]. | ||
*/ | ||
private const val DEFAULT_VIEW_STACK_SIZE = 20 | ||
internal const val TYPE_NAME = "ux.view" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defining these in each data source is really calling out for a central repository now 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will address this in a separate PR
/** | ||
* Captures fragment breadcrumbs. | ||
*/ | ||
internal class LegacyFragmentBreadcrumbDataSource( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality of the legacy services are validated by... the integration tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's existing test coverage yes. I think this one is covered by existing unit test coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6a61b7d
to
3242f45
Compare
Goal
Implements the capture of fragment breadcrumbs via the
DataSource
interface which allows them to be sent as OTel spans in the session payload. It's important to note this does not alter the session payload yet. TheLegacyFragmentBreadcrumbDataSource
will continue to add directly to the payload.A future PR will contain the changeset for enabling the new data capture mechanism. This uncouples work & allows us to merge more without blocking changes.
Testing
Added a unit test.