Skip to content

Conversation

@denrase
Copy link
Collaborator

@denrase denrase commented Nov 10, 2025

📜 Description

Remove SenreySwiftLog for the following reasons:

  • The swift-log dependency is mainly intended for Swift server projects, which we do not support yet.
  • Keep the Package.swift clean of external depencies if possible.
  • We will create a separate repo to add integrations like Log Integration: Pulse #6279 , Log Integration: CocoaLumberjack #6278 , etc.
  • If there is demand after all, we can re-add it there.

#skip-changelog

💡 Motivation and Context

During an internal discussion, @noahsmartin raised concerns about the inclusion of the SentrySwiftLog package, which integrates with the swift-log framework. This is mainly used with Swift on the server, which our SDK does not support. Also, this dependency could affect CI build times for all users of the SDK, so it was decided to remove this integration from the main repo, with the option to re-introduce it in a separate repo, together with other log integrations.

This was added by #6286

💚 How did you test it?

CI should run without issues.

@denrase denrase changed the title Remove SentrySwiftLog Remove SentrySwiftLog Integration Nov 10, 2025
@denrase denrase added the ready-to-merge Use this label to trigger all PR workflows label Nov 10, 2025
@codecov
Copy link

codecov bot commented Nov 10, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3932 1 3931 55
View the top 1 failed test(s) by shortest run time
iOS_Swift_UITests.LaunchUITests::testBreadcrumbData
Stack Traces | 0s run time
.../iOS-Swift/iOS-Swift-UITests/BaseUITest.swift:63 - Failed to terminate io.sentry.sample.iOS-Swift:10838: Failed to terminate io.sentry.sample.iOS-Swift:0

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

@denrase denrase marked this pull request as ready for review November 10, 2025 15:30
@philipphofmann
Copy link
Member

Please also remove the existing changelog entry for the SwiftLog integration, and please link to the issue and PR that added this feature. Also please then add a link to this PR from the GH issue and PR that added this feature, so we can easily find it from there.

# Conflicts:
#	Sentry.xcodeproj/project.pbxproj
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Conflicting feature status in CHANGELOG.

The CHANGELOG contains contradictory entries for SentrySwiftLog in version 9.0.0-alpha.0. Line 7 in the Unreleased section says "Remove SentrySwiftLog Integration" while line 72 in the 9.0.0-alpha.0 Features section says "Structured Logs: Add SentrySwiftLog Integration". The removal entry should have replaced the addition entry in 9.0.0-alpha.0 since the feature is being removed before release.

CHANGELOG.md#L71-L72

- Add `sentry.replay_id` attribute to logs ([#6515](https://github.com/getsentry/sentry-cocoa/pull/6515))
- Structured Logs: Add `SentrySwiftLog` Integration (#6286)

Fix in Cursor Fix in Web


@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1221.26 ms 1251.29 ms 30.03 ms
Size 24.14 KiB 1.01 MiB 1010.98 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ad964ca 1234.73 ms 1254.88 ms 20.15 ms
e16fd46 1228.64 ms 1251.57 ms 22.93 ms
c8dd5e4 1217.67 ms 1242.90 ms 25.23 ms
6d0b605 1218.58 ms 1251.06 ms 32.48 ms
f747c9c 1237.90 ms 1264.77 ms 26.87 ms
2691350 1224.92 ms 1255.82 ms 30.90 ms
fc05805 1220.63 ms 1252.16 ms 31.54 ms
d83b35a 1212.48 ms 1237.02 ms 24.54 ms
d157d83 1228.02 ms 1252.47 ms 24.45 ms
1fecbb8 1242.78 ms 1265.40 ms 22.62 ms

App size

Revision Plain With Sentry Diff
ad964ca 23.75 KiB 913.17 KiB 889.42 KiB
e16fd46 23.74 KiB 1.01 MiB 1008.95 KiB
c8dd5e4 23.75 KiB 913.48 KiB 889.72 KiB
6d0b605 23.75 KiB 1023.82 KiB 1000.07 KiB
f747c9c 23.75 KiB 995.60 KiB 971.85 KiB
2691350 23.75 KiB 850.73 KiB 826.98 KiB
fc05805 23.75 KiB 908.02 KiB 884.27 KiB
d83b35a 23.75 KiB 913.17 KiB 889.42 KiB
d157d83 23.75 KiB 928.85 KiB 905.10 KiB
1fecbb8 23.75 KiB 969.28 KiB 945.53 KiB

Previous results on branch: chore/remove-swift-log

Startup times

Revision Plain With Sentry Diff
f6ca914 1221.06 ms 1250.17 ms 29.11 ms
4fe12d9 1233.43 ms 1259.60 ms 26.17 ms

App size

Revision Plain With Sentry Diff
f6ca914 24.15 KiB 1.01 MiB 1015.23 KiB
4fe12d9 24.15 KiB 1.01 MiB 1015.25 KiB

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM, after updating the changelog as pointed out below.

@ValentinWalter
Copy link

ValentinWalter commented Nov 12, 2025

I find this unfortunate, because swift-log is the foundational "logging-glue" in the Swift ecosystem. It is not only used in server use cases. For example, we use it to integrate logging between package boundaries. We have a set of cross platform packages that cannot depend on Sentry — only the top level app package can do so.

Have you considered offering a package trait to keep the swift-log dependency off by default? That would alleviate extra build time concerns while still keeping the swift-log integration in the main package, given its special place in the ecosystem.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • .github/file-filters.yml

@denrase
Copy link
Collaborator Author

denrase commented Nov 12, 2025

@ValentinWalter Thx, for your feedback! We have discussed this internally. For the reasons mentioned above, and also to move forward with V9, we will be removing this from the main branch for now. We'll definitely take your comments into consideration when deciding how to best integration this into Sentry.

@denrase denrase merged commit f9d45aa into main Nov 12, 2025
190 of 194 checks passed
@denrase denrase deleted the chore/remove-swift-log branch November 12, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants