Skip to content

[Structured Logs]: Expose Public API #2940

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

Open
wants to merge 43 commits into
base: feat/logs
Choose a base branch
from
Open

[Structured Logs]: Expose Public API #2940

wants to merge 43 commits into from

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented May 13, 2025

📜 Description

  • Renamed old SentryLogger to SdkLog
  • Renamed old options.logger to options.log

💡 Motivation and Context

Closes #2924

💚 How did you test it?

Unit tests, example app

Bildschirmfoto 2025-05-13 um 16 21 45

📝 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

🔮 Next steps

@buenaflor I'm only seeing logs when they are sent through the web version (JS). I'm assuming the native SDKs are missing envelope header info, as they can't parse what they don't know.

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

Copy link

codecov bot commented May 13, 2025

Codecov Report

Attention: Patch coverage is 61.05263% with 74 lines in your changes missing coverage. Please review.

Project coverage is 87.60%. Comparing base (2b265e7) to head (27af589).

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/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 ⚠️
flutter/lib/src/replay/scheduled_recorder.dart 60.00% 2 Missing ⚠️
... and 21 more
Additional details and impacted files
@@              Coverage Diff              @@
##           feat/logs    #2940      +/-   ##
=============================================
- Coverage      87.72%   87.60%   -0.13%     
=============================================
  Files            277      278       +1     
  Lines           9133     9162      +29     
=============================================
+ Hits            8012     8026      +14     
- Misses          1121     1136      +15     

☔ 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.

@denrase denrase changed the title [Structured Logs]: Logger API [Structured Logs]: Expose Public API May 13, 2025
@denrase denrase marked this pull request as ready for review May 13, 2025 14:30
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.

I'll have a closer look tomorrow

@denrase denrase requested a review from buenaflor May 13, 2025 15:29
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