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

API and integration tests for manually ending UI load traces #1790

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented Jan 2, 2025

Goal

Add in the ability to specify that a a UI Load trace should wait for a manual end as well as a public API to do that.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.46%. Comparing base (505d329) to head (59d7670).

Files with missing lines Patch % Lines
...nternal/api/delegate/InstrumentationApiDelegate.kt 75.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1790      +/-   ##
==========================================
- Coverage   85.47%   85.46%   -0.02%     
==========================================
  Files         466      467       +1     
  Lines       10948    10961      +13     
  Branches     1626     1628       +2     
==========================================
+ Hits         9358     9368      +10     
  Misses        861      861              
- Partials      729      732       +3     
Files with missing lines Coverage Δ
.../embrace/android/embracesdk/internal/api/SdkApi.kt 0.00% <ø> (ø)
.../embracesdk/internal/capture/activity/UiLoadExt.kt 100.00% <100.00%> (ø)
...main/java/io/embrace/android/embracesdk/Embrace.kt 85.18% <100.00%> (+0.18%) ⬆️
.../java/io/embrace/android/embracesdk/EmbraceImpl.kt 77.10% <100.00%> (+0.27%) ⬆️
...nternal/api/delegate/InstrumentationApiDelegate.kt 75.00% <75.00%> (ø)

... and 1 file with indirect coverage changes

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.

This looks good but I'd like for swazzler instrumentation to be in place (or approved) before it gets merged

*/
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
public annotation class CustomTracedActivity
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not 100% on this name for a public API as it doesn't detail that this is about the Embrace SDK/UI load tracking, and there are potentially a lot of things that could be traced in an activity. Having said that, I don't have a better suggestion. Would you say the key components of this annotation would be that Embrace will automatically trace lifecycle events of any activity annotated with it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I honestly hate this name too, but I also couldn't come up with something better. I wanted to make it similar to TracedActivity

Perhaps CustomLoadTracedActivity? And we can rename the other one LoadTracedActivity?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good 👍

Copy link
Collaborator Author

Sounds good. I'll get that going first thing I can delve back into the code.

@bidetofevil bidetofevil force-pushed the hho/load-trace-config branch from 7bbd8fe to 5065414 Compare January 6, 2025 16:05
@bidetofevil bidetofevil force-pushed the hho/load-trace-config branch 2 times, most recently from cd6536e to 42f2e2b Compare January 6, 2025 19:52
@bidetofevil bidetofevil force-pushed the hho/manual-end-api branch 3 times, most recently from 6ee610c to dd7f138 Compare January 6, 2025 21:22
@bidetofevil bidetofevil changed the base branch from hho/load-trace-config to graphite-base/1790 January 6, 2025 22:37
@bidetofevil bidetofevil changed the base branch from graphite-base/1790 to main January 6, 2025 22:38
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

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.

2 participants