Skip to content

Sentry Structured Logs #2919

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

Merged
merged 8 commits into from
May 20, 2025
Merged

Sentry Structured Logs #2919

merged 8 commits into from
May 20, 2025

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented May 7, 2025

📜 Description

💡 Motivation and Context

Closes #2915

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

Copy link
Contributor

github-actions bot commented May 7, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c387013

Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 72.40143% with 77 lines in your changes missing coverage. Please review.

Project coverage is 87.60%. Comparing base (436a1fc) to head (c387013).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dart/lib/src/hub.dart 13.88% 31 Missing ⚠️
dart/lib/src/sentry_logger.dart 83.33% 3 Missing ⚠️
flutter/lib/src/sentry_flutter.dart 25.00% 3 Missing ⚠️
dart/lib/src/hub_adapter.dart 0.00% 2 Missing ⚠️
...rt/lib/src/load_dart_debug_images_integration.dart 33.33% 2 Missing ⚠️
dart/lib/src/noop_log_batcher.dart 0.00% 2 Missing ⚠️
dart/lib/src/sentry.dart 66.66% 2 Missing ⚠️
dart/lib/src/sentry_baggage.dart 66.66% 2 Missing ⚠️
...r/lib/src/native/java/android_replay_recorder.dart 0.00% 2 Missing ⚠️
.../lib/src/navigation/sentry_navigator_observer.dart 0.00% 2 Missing ⚠️
... and 23 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2919      +/-   ##
==========================================
- Coverage   87.66%   87.60%   -0.06%     
==========================================
  Files         272      278       +6     
  Lines        9054     9173     +119     
==========================================
+ Hits         7937     8036      +99     
- Misses       1117     1137      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

github-actions bot commented May 7, 2025

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1260.63 ms 1266.62 ms 5.99 ms
Size 8.43 MiB 10.00 MiB 1.56 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6fedcab 1242.33 ms 1269.66 ms 27.33 ms
95d0636 1243.73 ms 1245.54 ms 1.81 ms
5603ab2 1268.47 ms 1280.73 ms 12.26 ms
c328ffc 1236.73 ms 1260.73 ms 24.00 ms
00236a7 1250.06 ms 1274.00 ms 23.94 ms
0aa80ac 1275.92 ms 1278.63 ms 2.72 ms
e3d9076 1203.68 ms 1230.65 ms 26.97 ms
5aba417 1265.31 ms 1287.90 ms 22.59 ms
3ad66e4 1230.44 ms 1245.08 ms 14.65 ms
ecb4003 1266.94 ms 1290.24 ms 23.31 ms

App size

Revision Plain With Sentry Diff
6fedcab 8.32 MiB 9.50 MiB 1.18 MiB
95d0636 8.29 MiB 9.38 MiB 1.09 MiB
5603ab2 8.15 MiB 9.12 MiB 990.57 KiB
c328ffc 8.34 MiB 9.67 MiB 1.33 MiB
00236a7 8.38 MiB 9.77 MiB 1.39 MiB
0aa80ac 8.43 MiB 9.99 MiB 1.56 MiB
e3d9076 8.33 MiB 9.40 MiB 1.07 MiB
5aba417 8.16 MiB 9.17 MiB 1.01 MiB
3ad66e4 8.32 MiB 9.38 MiB 1.05 MiB
ecb4003 8.09 MiB 9.07 MiB 1000.82 KiB

Previous results on branch: feat/logs

Startup times

Revision Plain With Sentry Diff
2b265e7 1252.19 ms 1268.96 ms 16.77 ms
d14ba16 1255.86 ms 1266.10 ms 10.24 ms
5bb147c 1251.28 ms 1271.47 ms 20.19 ms

App size

Revision Plain With Sentry Diff
2b265e7 8.43 MiB 10.02 MiB 1.58 MiB
d14ba16 8.43 MiB 10.02 MiB 1.58 MiB
5bb147c 8.43 MiB 10.02 MiB 1.58 MiB

@denrase denrase mentioned this pull request May 8, 2025
6 tasks
Copy link
Contributor

github-actions bot commented May 13, 2025

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 508.83 ms 587.19 ms 78.35 ms
Size 6.44 MiB 7.43 MiB 1014.13 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
42f6e7e 308.71 ms 360.06 ms 51.35 ms
8e4eeb3 365.78 ms 435.58 ms 69.80 ms
803f3a9 424.66 ms 505.24 ms 80.58 ms
6daa837 363.28 ms 424.71 ms 61.43 ms
f735167 404.38 ms 412.57 ms 8.19 ms
cc80714 333.26 ms 388.80 ms 55.54 ms
8fa3934 340.64 ms 407.92 ms 67.28 ms
b49bf00 323.46 ms 375.35 ms 51.89 ms
134c9f8 301.40 ms 352.65 ms 51.26 ms
8c0b6dc 454.21 ms 512.22 ms 58.01 ms

App size

Revision Plain With Sentry Diff
42f6e7e 6.27 MiB 7.20 MiB 956.06 KiB
8e4eeb3 6.33 MiB 7.27 MiB 954.12 KiB
803f3a9 6.46 MiB 7.48 MiB 1.02 MiB
6daa837 6.34 MiB 7.29 MiB 970.37 KiB
f735167 6.46 MiB 7.48 MiB 1.01 MiB
cc80714 6.34 MiB 7.28 MiB 966.31 KiB
8fa3934 6.06 MiB 7.09 MiB 1.03 MiB
b49bf00 6.06 MiB 7.10 MiB 1.04 MiB
134c9f8 5.94 MiB 6.95 MiB 1.01 MiB
8c0b6dc 6.49 MiB 7.56 MiB 1.07 MiB

Previous results on branch: feat/logs

Startup times

Revision Plain With Sentry Diff
2b265e7 454.83 ms 537.04 ms 82.21 ms
d14ba16 515.76 ms 585.18 ms 69.42 ms

App size

Revision Plain With Sentry Diff
2b265e7 6.44 MiB 7.43 MiB 1011.23 KiB
d14ba16 6.44 MiB 7.43 MiB 1014.13 KiB

Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/lib/src/integrations/native_app_start_integration.dart
  • flutter/lib/src/native/java/android_replay_recorder.dart
  • flutter/lib/src/screenshot/recorder.dart
  • flutter/lib/src/screenshot/widget_filter.dart

@buenaflor buenaflor marked this pull request as ready for review May 20, 2025 10:53
@buenaflor
Copy link
Contributor

Tested it locally:

✅ Android
✅ iOS

Screenshot 2025-05-20 at 13 09 08

Copy link
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

All the merged branches have already been reviewed and approved.

I locally tested it an Logs work for both Android and iOS

@buenaflor buenaflor merged commit 9ef5d50 into main May 20, 2025
166 of 169 checks passed
@buenaflor buenaflor deleted the feat/logs branch May 20, 2025 12:34
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.

Sentry Structured Logs for Dart/Flutter
2 participants