Skip to content

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Oct 16, 2025

📜 Description

  • Capture stdout/stderr and log with structured logs.

💡 Motivation and Context

Just a first draft. It works in principle, so we are getting print and NSLog strings as structured logs and still in console.

The issue lies in infinite loops that could occur if we do internal SentrySDKLog call while calling structured logs. Not sure yet how to reliably handle this.

Maybe @noahsmartin has some pointers for us?

Closes #6411

💚 How did you test it?

📝 Checklist

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.

Copy link

codecov bot commented Oct 16, 2025

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
3978 7 3971 30
View the top 3 failed test(s) by shortest run time
SentryTests.SentryFileManagerTests::testCreateDirectoryIfNotExists_pathTooLogError_shouldLogError
Stack Traces | 0s run time
.../SentryTests/Helper/SentryFileManagerTests.swift:1116 - XCTAssertEqual failed: ("7") is not equal to ("1")
SentryTests.SentryHttpTransportFlushIntegrationTests::testFlush_CallingFlushDirectlyAfterCapture_Flushes
Stack Traces | 0s run time
.../SentryTests/Networking/SentryHttpTransportFlushIntegrationTests.swift:67 - XCTAssertEqual failed: ("1") is not equal to ("0")
SentryTests.SentryHttpTransportFlushIntegrationTests::testFlush_WhenNoInternet_BlocksAndFinishes
Stack Traces | 0s run time
.../SentryTests/Networking/SentryHttpTransportFlushIntegrationTests.swift:44 - XCTAssertEqual failed: ("SentryFlushResult(rawValue: 1)") is not equal to ("SentryFlushResult(rawValue: 0)") - Flush should not time out.
iOS_Swift6_UITests.UITests::testLaunchAndCaptureError
Stack Traces | 0s run time
.../iOS-Swift6/iOS-Swift6-UITests/UITests.swift:12 - Failed to tap "btError" Button: Timed out while evaluating UI query.
iOS_SwiftUI_UITests.FeedbackUITests::testWidgetDisplayInSwiftUIApp
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/FeedbackUITests.swift:14 - Failed to get matching snapshots: Unable to perform work on main run loop, process main thread busy for 30.0s
iOS_SwiftUI_UITests.LaunchUITests::testCaptureErrorReturnsValidId
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/LaunchUITests.swift:85 - Failed to launch io.sentry.iOS-SwiftUI: Timed out attempting to launch app.
iOS_SwiftUI_UITests.LaunchUITests::testNoNewTransactionForSecondCallToBody
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/LaunchUITests.swift:85 - Failed to launch io.sentry.iOS-SwiftUI: Timed out attempting to launch app.
iOS_SwiftUI_UITests.LaunchUITests::testTTID_TTFD
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/LaunchUITests.swift:85 - Failed to launch io.sentry.iOS-SwiftUI: Timed out attempting to launch app.
iOS_SwiftUI_UITests.LaunchUITests::testTransactionSpan
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/LaunchUITests.swift:85 - Failed to launch io.sentry.iOS-SwiftUI: Timed out attempting to launch app.
tvOS_Swift_UITests.LaunchUITests::testLaunch
Stack Traces | 0s run time
.../tvOS-Swift/tvOS-Swift-UITests/LaunchUITests.swift:27 - Failed to get matching snapshots: Timed out while evaluating UI query.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1194.12 ms 1215.43 ms 21.31 ms
Size 23.75 KiB 1012.51 KiB 988.76 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b045d0a 1227.48 ms 1252.22 ms 24.75 ms
21efa18 1227.73 ms 1250.04 ms 22.31 ms
50a9ff7 1221.43 ms 1238.07 ms 16.64 ms
0ee162c 1226.90 ms 1261.72 ms 34.83 ms
c63e0fe 1230.58 ms 1253.94 ms 23.35 ms
41c0aa8 1222.75 ms 1262.40 ms 39.65 ms
32584c4 1225.58 ms 1256.02 ms 30.44 ms
3133d0e 1237.86 ms 1262.87 ms 25.01 ms
2de3f92 1207.56 ms 1234.96 ms 27.40 ms
891fd1d 1220.02 ms 1227.60 ms 7.57 ms

App size

Revision Plain With Sentry Diff
b045d0a 23.75 KiB 880.21 KiB 856.46 KiB
21efa18 23.75 KiB 919.70 KiB 895.95 KiB
50a9ff7 23.75 KiB 913.63 KiB 889.89 KiB
0ee162c 23.75 KiB 933.33 KiB 909.58 KiB
c63e0fe 23.74 KiB 874.08 KiB 850.33 KiB
41c0aa8 23.75 KiB 986.80 KiB 963.05 KiB
32584c4 23.75 KiB 920.74 KiB 896.99 KiB
3133d0e 23.74 KiB 976.79 KiB 953.04 KiB
2de3f92 23.75 KiB 919.69 KiB 895.94 KiB
891fd1d 23.75 KiB 919.92 KiB 896.17 KiB

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 Logs: Collect stdout per default

1 participant