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

Use new webView data source in prod #680

Merged
merged 9 commits into from
Apr 15, 2024

Conversation

nelsitoPuglisi
Copy link
Contributor

@nelsitoPuglisi nelsitoPuglisi commented Apr 9, 2024

Goal

Track web view urls as span events of the session span instead of breadcrumbs.

Testing

Unit test, Integration test and manual test.

Copy link
Contributor Author

nelsitoPuglisi commented Apr 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @nelsitoPuglisi and the rest of your teammates on Graphite Graphite

@nelsitoPuglisi nelsitoPuglisi changed the title replace legacy data source Use new webView data source in prod Apr 9, 2024
Base automatically changed from nelson/web-view-data-source to master April 9, 2024 13:55
@nelsitoPuglisi nelsitoPuglisi force-pushed the nelson/web-view-data-source-prod branch from 279109f to b75643e Compare April 9, 2024 14:01
@nelsitoPuglisi nelsitoPuglisi marked this pull request as ready for review April 10, 2024 17:05
@nelsitoPuglisi nelsitoPuglisi requested a review from a team as a code owner April 10, 2024 17:05
@nelsitoPuglisi nelsitoPuglisi force-pushed the nelson/web-view-data-source-prod branch from bb2ef39 to 2fbf60d Compare April 10, 2024 17:45
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

Looks good barring one inline comment. I'd also like to confirm that this has been tested E2E before this gets merged.

It would be good to write an integration test too that checks the feature.

@nelsitoPuglisi
Copy link
Contributor Author

Looks good barring one inline comment. I'd also like to confirm that this has been tested E2E before this gets merged.

It would be good to write an integration test too that checks the feature.

Yes, I tested it manually and checked the json received in the backend, and the dashboard displays it properly.

Besides that, this integration test covers the funcionality https://github.com/embrace-io/embrace-android-sdk/pull/680/files#diff-49417e80327f621fcf052fcad356035ea38339cb3faba2de6bc3242ae5c81e25R120

@nelsitoPuglisi nelsitoPuglisi force-pushed the nelson/web-view-data-source-prod branch 3 times, most recently from 420deeb to 4c0c0be Compare April 12, 2024 23:07
@nelsitoPuglisi nelsitoPuglisi changed the base branch from master to nelson/inject-data-sources April 12, 2024 23:07
@nelsitoPuglisi nelsitoPuglisi force-pushed the nelson/web-view-data-source-prod branch from 4c0c0be to be4eb50 Compare April 12, 2024 23:10
This was referenced Apr 13, 2024
)
) {
fun logWebView(url: String) {
Embrace.getImpl().logWebView(url)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need to add this here? Shouldn't the integration test be testing the API by going through Embrace.java in the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no public api to track web view URL, it's captured through the swazzler hook.

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 79.77%. Comparing base (64ddfe4) to head (e384707).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #680      +/-   ##
==========================================
- Coverage   79.82%   79.77%   -0.05%     
==========================================
  Files         429      429              
  Lines       11328    11330       +2     
  Branches     1719     1720       +1     
==========================================
- Hits         9043     9039       -4     
- Misses       1554     1563       +9     
+ Partials      731      728       -3     
Files Coverage Δ
.../embracesdk/capture/crumbs/BreadcrumbsSanitizer.kt 100.00% <100.00%> (ø)
...e/android/embracesdk/injection/DataSourceModule.kt 100.00% <100.00%> (ø)
.../embrace/android/embracesdk/payload/Breadcrumbs.kt 100.00% <ø> (ø)
...racesdk/capture/crumbs/EmbraceBreadcrumbService.kt 82.97% <50.00%> (-2.74%) ⬇️
...embrace/android/embracesdk/gating/SpanSanitizer.kt 82.75% <33.33%> (-2.43%) ⬇️

... and 5 files with indirect coverage changes

Base automatically changed from nelson/inject-data-sources to master April 15, 2024 13:02
@nelsitoPuglisi nelsitoPuglisi force-pushed the nelson/web-view-data-source-prod branch from 5edc7f6 to f4b7b57 Compare April 15, 2024 13:04
@fractalwrench fractalwrench self-requested a review April 15, 2024 13:26
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

LGTM

@nelsitoPuglisi nelsitoPuglisi force-pushed the nelson/web-view-data-source-prod branch from f4b7b57 to e384707 Compare April 15, 2024 17:23
@nelsitoPuglisi nelsitoPuglisi merged commit 5438954 into master Apr 15, 2024
4 checks passed
@nelsitoPuglisi nelsitoPuglisi deleted the nelson/web-view-data-source-prod branch April 15, 2024 21:20
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.

None yet

3 participants