Skip to content

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Aug 26, 2025

📜 Description

If debug is set to true in SDK init, calls to the Sentry logger API should also print to the console with the appropriate log level. This will help debugging logging setups.

https://develop.sentry.dev/sdk/telemetry/logs/#other

💡 Motivation and Context

Closes #5948

💚 How did you test it?

📝 Checklist

Tested with sample app.

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@denrase denrase marked this pull request as ready for review August 26, 2025 10:59
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@c122943). Learn more about missing BASE report.
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main     #5991   +/-   ##
========================================
  Coverage        ?   86.694%           
========================================
  Files           ?       424           
  Lines           ?     36661           
  Branches        ?     17335           
========================================
  Hits            ?     31783           
  Misses          ?      4833           
  Partials        ?        45           
Files with missing lines Coverage Δ
Sources/Swift/Protocol/SentryLogLevel.swift 100.000% <100.000%> (ø)
Sources/Swift/Tools/SentryLogger.swift 99.428% <100.000%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c122943...a809b9b. Read the comment docs.

Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1226.90 ms 1258.31 ms 31.41 ms
Size 23.74 KiB 926.80 KiB 903.05 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7908e84 1224.33 ms 1246.39 ms 22.06 ms
2a7868a 1226.54 ms 1256.92 ms 30.37 ms
795dd39 1216.88 ms 1245.47 ms 28.59 ms
7f2f69c 1237.61 ms 1266.96 ms 29.35 ms
1a34ddc 1217.79 ms 1242.17 ms 24.38 ms
409a607 1229.57 ms 1251.45 ms 21.88 ms
4d264fa 1223.48 ms 1246.91 ms 23.44 ms
d637379 1226.43 ms 1250.77 ms 24.34 ms
018037b 1209.31 ms 1228.33 ms 19.03 ms
9e6569a 1216.07 ms 1242.50 ms 26.43 ms

App size

Revision Plain With Sentry Diff
7908e84 23.74 KiB 872.75 KiB 849.00 KiB
2a7868a 23.75 KiB 880.20 KiB 856.45 KiB
795dd39 23.75 KiB 908.16 KiB 884.41 KiB
7f2f69c 23.75 KiB 913.38 KiB 889.63 KiB
1a34ddc 23.75 KiB 919.90 KiB 896.15 KiB
409a607 23.74 KiB 874.08 KiB 850.33 KiB
4d264fa 23.74 KiB 874.07 KiB 850.33 KiB
d637379 23.75 KiB 855.38 KiB 831.63 KiB
018037b 23.75 KiB 867.16 KiB 843.41 KiB
9e6569a 23.75 KiB 904.54 KiB 880.79 KiB

Copy link
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

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

lgtm

@denrase denrase merged commit 62f8d2a into main Aug 27, 2025
145 of 147 checks passed
@denrase denrase deleted the enha/debug-log-structured-logs branch August 27, 2025 09:17
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.

Structured Logging: No debug output during setup

2 participants