Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
e53fa94
Android side
buenaflor Nov 6, 2025
2748859
Update
buenaflor Nov 6, 2025
6033ea8
Update
buenaflor Nov 6, 2025
b864cf0
Update
buenaflor Nov 6, 2025
cb9f451
Simple ios ffi gen
buenaflor Nov 7, 2025
0f1a611
Fix compilation
buenaflor Nov 7, 2025
23d49da
Update
buenaflor Nov 10, 2025
3e15e01
Update
buenaflor Nov 10, 2025
36491eb
Remove method channel
buenaflor Nov 10, 2025
256ad72
Remove unnecessary code
buenaflor Nov 11, 2025
561d56e
Update
buenaflor Nov 11, 2025
89079ed
Update
buenaflor Nov 11, 2025
1dab36d
Update
buenaflor Nov 11, 2025
d7fe123
Update
buenaflor Nov 11, 2025
747c4c3
newlines
buenaflor Nov 11, 2025
b8d8378
newlines
buenaflor Nov 11, 2025
9d18550
Update
buenaflor Nov 11, 2025
444175e
Update
buenaflor Nov 11, 2025
7264607
Update
buenaflor Nov 11, 2025
63bb590
Update
buenaflor Nov 11, 2025
a968e32
Update
buenaflor Nov 11, 2025
1d807c3
Merge branch 'main' into enh/ffi-jni-init
buenaflor Nov 11, 2025
48fdf3a
Remove macos symlink to SentryFlutter.swift
buenaflor Nov 11, 2025
831e2aa
remove old files
buenaflor Nov 11, 2025
0ae02a4
Newlines
buenaflor Nov 11, 2025
7485ec9
Update
buenaflor Nov 11, 2025
ecc5f18
Update
buenaflor Nov 11, 2025
6b5168c
Update
buenaflor Nov 11, 2025
a220e61
Ktlint
buenaflor Nov 11, 2025
aae15bf
Ktlint
buenaflor Nov 11, 2025
505a2c3
Update
buenaflor Nov 11, 2025
e4e447f
Ktlint
buenaflor Nov 11, 2025
7bcea70
Ktlint
buenaflor Nov 11, 2025
3ab4b17
Ktlint
buenaflor Nov 11, 2025
2579aaf
Reuse setSdkMetaData
buenaflor Nov 11, 2025
af59e30
Update
buenaflor Nov 11, 2025
eb398be
Update
buenaflor Nov 11, 2025
64f2078
remove duplicate typedef capture callback
buenaflor Nov 11, 2025
8892a46
Generate JNI bindings tool
buenaflor Nov 11, 2025
b4ca367
Update
buenaflor Nov 11, 2025
9eae5fa
Update
buenaflor Nov 12, 2025
ade6888
Optimize JNI bindings size
buenaflor Nov 12, 2025
b07b9e4
Update
buenaflor Nov 12, 2025
85cb83f
Update jni binding creation
buenaflor Nov 12, 2025
b2a2c33
Swiftlint fix
buenaflor Nov 12, 2025
61b799a
Format
buenaflor Nov 12, 2025
490f204
Fix macos integration tests
buenaflor Nov 12, 2025
c2fbcd9
Update
buenaflor Nov 12, 2025
16c8522
Update
buenaflor Nov 12, 2025
0fc6690
Update
buenaflor Nov 12, 2025
60f5d20
Fix android test
buenaflor Nov 12, 2025
eb6c5c4
Update
buenaflor Nov 12, 2025
9156fbb
Update
buenaflor Nov 12, 2025
0fb645a
Update
buenaflor Nov 12, 2025
552f14b
Try fix ios integration test
buenaflor Nov 12, 2025
b5a2b91
Update
buenaflor Nov 12, 2025
fde01d6
Update
buenaflor Nov 12, 2025
231eae8
Fix ios build
buenaflor Nov 13, 2025
41938d4
Fix macos build
buenaflor Nov 13, 2025
c88d74d
Update
buenaflor Nov 13, 2025
81dcc72
Fix macos test
buenaflor Nov 13, 2025
ea1014d
Updatre
buenaflor Nov 13, 2025
7aedd3e
Update
buenaflor Nov 13, 2025
9774599
Update
buenaflor Nov 13, 2025
2f7cf8a
Allow bigger diffmax
buenaflor Nov 13, 2025
ab4c77e
Update swiftlint
buenaflor Nov 13, 2025
1f506d7
Revert JNI generation tool
buenaflor Nov 13, 2025
b505363
Update CHANGELOG
buenaflor Nov 13, 2025
39d9557
Update
buenaflor Nov 13, 2025
7dc7d06
Update
buenaflor Nov 13, 2025
63febf4
Remove replay_native test file, it is already tested in integration test
buenaflor Nov 13, 2025
976f8a1
Remove init_native_sdk test, already tested in integration test
buenaflor Nov 13, 2025
bbb2cbd
Update coverage
buenaflor Nov 13, 2025
40f9fde
Update coverage
buenaflor Nov 13, 2025
893dc0a
Update coverage
buenaflor Nov 13, 2025
1e73f1b
Fix web integration test
buenaflor Nov 13, 2025
130a676
Update
buenaflor Nov 13, 2025
21cac57
Update
buenaflor Nov 13, 2025
8cc7c05
Disable detekt for now
buenaflor Nov 13, 2025
18fe039
Update
buenaflor Nov 13, 2025
0f928f6
Merge branch 'disable/detekt' into enh/ffi-jni-init
buenaflor Nov 13, 2025
ab56b88
Update
buenaflor Nov 13, 2025
48149f1
Update
buenaflor Nov 13, 2025
9808a56
Try fix long running web integration test
buenaflor Nov 14, 2025
fd0aa08
Merge branch 'main' into enh/ffi-jni-init
buenaflor Nov 14, 2025
37f0c51
Fix memory leak
buenaflor Nov 14, 2025
d31f1a9
Update CI
buenaflor Nov 14, 2025
89fb6c2
Merge branch 'main' into enh/ffi-jni-init
buenaflor Nov 14, 2025
6f4ec41
Update CI
buenaflor Nov 14, 2025
1fa231b
Update CI
buenaflor Nov 14, 2025
fd0ba85
Update CI
buenaflor Nov 14, 2025
0a54877
Update CI
buenaflor Nov 14, 2025
ef9f743
Update comments
buenaflor Nov 14, 2025
13237cf
Update CI
buenaflor Nov 14, 2025
3807f78
Update CI
buenaflor Nov 14, 2025
ead9a05
Update CI
buenaflor Nov 17, 2025
0bb46ef
Update CI
buenaflor Nov 17, 2025
f96f0e5
Update CI
buenaflor Nov 17, 2025
1866d6b
Update CI
buenaflor Nov 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ runs:
with:
path: './${{ inputs.directory }}/coverage/lcov.info'
min_coverage: ${{ inputs.min-coverage }}
exclude: 'lib/src/native/**/binding.dart lib/src/native/java/android_replay_recorder.dart'
4 changes: 2 additions & 2 deletions .github/actions/flutter-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ runs:
# These FFI/JNI bindings are currently not unit tested due to limitations of FFI/JNI mocking.
dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart'
dart run remove_from_coverage -f coverage/lcov.info -r 'lib/src/native/sentry_native_channel.dart'
dart run remove_from_coverage -f coverage/lcov.info -r 'lib/src/native/java/sentry_native_java.dart'
dart run remove_from_coverage -f coverage/lcov.info -r 'lib/src/native/cocoa/sentry_native_cocoa.dart'
dart run remove_from_coverage -f coverage/lcov.info -r '^lib/src/native/java/.*\.dart$'
dart run remove_from_coverage -f coverage/lcov.info -r '^lib/src/native/cocoa/.*\.dart$'
fi
else
$testCmd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
directory: packages/flutter
coverage: sentry_flutter
min-coverage: 90
min-coverage: 85

# QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656
- name: Switch to Xcode 16.4 for iOS 18.5
Expand Down
150 changes: 62 additions & 88 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

# TODO: fix emulator caching, in ubuntu-latest emulator won't boot: https://github.com/ReactiveCircus/android-emulator-runner/issues/278

- name: launch android emulator & run android integration test
- name: Launch Android emulator & run Flutter Android integration test
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed #pin@v2.34.0
with:
working-directory: packages/flutter/example
Expand All @@ -67,24 +67,7 @@ jobs:
avd-name: avd-x86_64-31
emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: flutter test integration_test/all.dart --dart-define SENTRY_AUTH_TOKEN_E2E=$SENTRY_AUTH_TOKEN_E2E --verbose

- name: launch android emulator & run android integration test in profile mode
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed #pin@v2.34.0
with:
working-directory: packages/flutter/example
api-level: 31
profile: Nexus 6
arch: x86_64
force-avd-creation: false
avd-name: avd-x86_64-31
emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: flutter drive --driver=integration_test/test_driver/driver.dart --target=integration_test/sentry_widgets_flutter_binding_test.dart --profile -d emulator-5554

- name: Run Android native unit tests
working-directory: packages/flutter/example/android
run: ./gradlew testDebugUnitTest
script: flutter test integration_test/all.dart --dart-define SENTRY_AUTH_TOKEN_E2E=$SENTRY_AUTH_TOKEN_E2E --verbose && flutter drive --driver=integration_test/test_driver/driver.dart --target=integration_test/sentry_widgets_flutter_binding_test.dart --profile -d emulator-5554

- name: build apk
working-directory: packages/flutter/example/android
Expand Down Expand Up @@ -146,72 +129,63 @@ jobs:
run: |
flutter drive --driver=integration_test/test_driver/driver.dart --target=integration_test/sentry_widgets_flutter_binding_test.dart --profile -d "${{ steps.device.outputs.name }}"

- name: run native test
# We only have the native unit test package in the iOS xcodeproj at the moment.
# Should be OK because it will likely be removed after switching to FFI (see https://github.com/getsentry/sentry-dart/issues/1444).
if: ${{ matrix.target != 'macos' }}
working-directory: packages/flutter/example/${{ matrix.target }}
# For some reason running native unit tests directly after Flutter integration tests fails
# running flutter build ios before works: https://stackoverflow.com/a/77487525/22813624
run: |
flutter build ios --no-codesign
xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=$DEVICE_PLATFORM" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
env:
DEVICE_PLATFORM: ${{ steps.device.outputs.platform }}

web:
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: packages/flutter/example
strategy:
fail-fast: false
matrix:
# Temporarily disable beta because the job run is flaky
sdk: ['stable']
steps:
- name: checkout
uses: actions/checkout@v5

- name: Install Chrome Browser
uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # pin@v2.1.0
with:
chrome-version: stable
- run: chrome --version

- uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # pin@v2.21.0
with:
channel: ${{ matrix.sdk }}

- name: flutter pub get
run: flutter pub get

- name: Install Xvfb and dependencies
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo apt-get -y install xorg xvfb gtk2-engines-pixbuf
sudo apt-get -y install dbus-x11 xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable
sudo apt-get -y install imagemagick x11-apps

- name: Setup ChromeDriver
uses: nanasess/setup-chromedriver@e93e57b843c0c92788f22483f1a31af8ee48db25 # pin@2.3.0

- name: Start Xvfb and run tests
run: |
# Start Xvfb with specific screen settings
Xvfb -ac :99 -screen 0 1280x1024x16 &
export DISPLAY=:99

# Start ChromeDriver
chromedriver --port=4444 &

# Wait for services to start
sleep 5

# Run the tests
flutter drive \
--driver=integration_test/test_driver/driver.dart \
--target=integration_test/web_sdk_test.dart \
-d chrome
# TODO(buenaflor): fix the web integration test. The tests pass but the driver keeps hanging so the workflow cancels after 30minutes
# web:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# defaults:
# run:
# working-directory: packages/flutter/example
# strategy:
# fail-fast: false
# matrix:
# # Temporarily disable beta because the job run is flaky
# sdk: ['stable']
# steps:
# - name: checkout
# uses: actions/checkout@v5
#
# - name: Install Chrome Browser
# uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # pin@v2.1.0
# with:
# chrome-version: stable
# - run: chrome --version
#
# - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # pin@v2.21.0
# with:
# channel: ${{ matrix.sdk }}
#
# - name: flutter pub get
# run: flutter pub get
#
# - name: Install Xvfb and dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y xvfb
# sudo apt-get -y install xorg xvfb gtk2-engines-pixbuf
# sudo apt-get -y install dbus-x11 xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable
# sudo apt-get -y install imagemagick x11-apps
#
# - name: Setup ChromeDriver
# uses: nanasess/setup-chromedriver@e93e57b843c0c92788f22483f1a31af8ee48db25 # pin@2.3.0
#
# - name: Start Xvfb and ChromeDriver and run tests
# run: |
# # Start Xvfb with specific screen settings
# Xvfb -ac :99 -screen 0 1280x1024x16 &
# export DISPLAY=:99
#
# # Start ChromeDriver
# chromedriver --port=4444 &
#
# # Wait for services to start
# sleep 5
#
# flutter drive \
# --driver=integration_test/test_driver/driver.dart \
# --target=integration_test/platform_integrations_test.dart \
# -d chrome
# flutter drive \
# --driver=integration_test/test_driver/driver.dart \
# --target=integration_test/web_sdk_test.dart \
# -d chrome
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Enhancements

- Refactor `captureReplay` and `setReplayConfig` to use FFI/JNI ([#3318](https://github.com/getsentry/sentry-dart/pull/3318))
- Refactor `init` to use FFI/JNI ([#3324](https://github.com/getsentry/sentry-dart/pull/3324))

## 9.8.0

Expand Down
2 changes: 1 addition & 1 deletion metrics/metrics-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ startupTimeTest:

binarySizeTest:
diffMin: 900 KiB
diffMax: 1200 KiB
diffMax: 1300 KiB
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class ClientReportTransport implements Transport {
@visibleForTesting
RateLimiter? get rateLimiter => _rateLimiter;

@visibleForTesting
Transport? get innerTransport => _transport;

int _numberOfDroppedEnvelopes = 0;

@visibleForTesting
Expand Down
5 changes: 3 additions & 2 deletions packages/flutter/android/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Keep classes used by JNI
-keep class io.sentry.** { *; }

# Keep bitmap classes used by JNI
-keep class android.graphics.Bitmap { *; }
-keep class android.graphics.Bitmap$Config { *; }
-keep class java.net.Proxy { *; }
-keep class java.net.Proxy$Type { *; }

# To ensure that stack traces is unambiguous
# https://developer.android.com/studio/build/shrink-code#decode-stack-trace
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.sentry.flutter

interface ReplayRecorderCallbacks {
fun replayStarted(
replayId: String,
replayIsBuffering: Boolean,
)

fun replayResumed()

fun replayPaused()

fun replayStopped()

fun replayReset()

fun replayConfigChanged(
width: Int,
height: Int,
frameRate: Int,
)
}
Loading
Loading