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

Memory warning datasource #731

Merged
merged 8 commits into from
Apr 16, 2024
Merged

Conversation

leandro-godon
Copy link
Contributor

Goal

Send the Low Memory Warnings as span events.

Removal of warnings in PerformanceInfo will be in a different PR.

Testing

Tested against the production dashboard, verified that the events were visible.

# Conflicts:
#	embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/DataSourceModule.kt
#	embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/injection/DataSourceModuleImplTest.kt
@leandro-godon leandro-godon requested a review from a team as a code owner April 15, 2024 23:09
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

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

Project coverage is 80.64%. Comparing base (53461e0) to head (4a6afc5).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #731      +/-   ##
==========================================
- Coverage   80.65%   80.64%   -0.02%     
==========================================
  Files         423      424       +1     
  Lines       11148    11173      +25     
  Branches     1671     1672       +1     
==========================================
+ Hits         8991     9010      +19     
- Misses       1452     1459       +7     
+ Partials      705      704       -1     
Files Coverage Δ
.../embrace/android/embracesdk/arch/schema/EmbType.kt 58.82% <100.00%> (+1.24%) ⬆️
...brace/android/embracesdk/arch/schema/SchemaType.kt 72.22% <100.00%> (+0.63%) ⬆️
...bracesdk/capture/memory/MemoryWarningDataSource.kt 100.00% <100.00%> (ø)
...d/embracesdk/injection/DataCaptureServiceModule.kt 98.11% <100.00%> (ø)
...e/android/embracesdk/injection/DataSourceModule.kt 100.00% <100.00%> (ø)
.../embracesdk/capture/memory/EmbraceMemoryService.kt 92.30% <66.66%> (-7.70%) ⬇️

... and 8 files 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.

Looks good but this is missing an integration test that verifies the feature is working as we'd expect. As there isn't a public API for triggering a memory warning it'd be ok to add a shim to trigger a memory warning.

# Conflicts:
#	embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/injection/DataSourceModuleImplTest.kt
@leandro-godon leandro-godon changed the title Memory warning datatsource Memory warning datasource Apr 16, 2024
@leandro-godon
Copy link
Contributor Author

Added an integration test.

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

# Conflicts:
#	embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/injection/DataSourceModule.kt
#	embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/injection/DataSourceModuleImplTest.kt
@leandro-godon leandro-godon merged commit e9fc580 into master Apr 16, 2024
4 checks passed
@leandro-godon leandro-godon deleted the leandro/memory_warning_datatsource branch April 16, 2024 22:00
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

2 participants