-
-
Notifications
You must be signed in to change notification settings - Fork 371
docs: Add integrations documentation to developer-docs section #6902
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
Conversation
|
@itaybre We also got this suggestions to use package traits. There dependencies can also be defined as optional. Glanced over it and it uses conditional compilation in the codebase, but I'm not sure this will play out with our approach to offer pre-compiled artefacts in SPM? https://docs.swift.org/swiftpm/documentation/packagemanagerdocs/packagetraits/ Maybe worth considering it though, if not for the main For example, swift-configuration has a trait for a .trait(
name: "LoggingSupport",
description: "Adds support for swift-log integration."
),
...
.product(
name: "Logging",
package: "swift-log",
condition: .when(traits: ["LoggingSupport"])
), |
Looks like traits are only supported in Swift 6.1+ |
philipphofmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename the file to 3rd-party-integrations or something similar, otherwise you could confuse it with the SentryIntegrations in the code such as SentryCrashIntegration, ...
I would only mention the chosen approach in the Integrations.md. I think you could add the discussed approaches and the pros and cons to the https://github.com/getsentry/sentry-cocoa/blob/main/develop-docs/DECISIONS.md.
philipphofmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good enough for a start. We will update this as we go. Thanks @itaybre
Moving these docs from Notion to Github.
Opinions on Notion
@itaybre:
I believe the option 3 (automated releases from sentry-cocoa) is the way forward because at this moment our biggest constraint are the man hours, adding more workload for us is not going to help us as a team, and once the set up is ready, we shouldn’t need to maintain the release workflow, all with having the best solution of users which is only importing the integration they need.
If going with a repo per integration, repo name scheme:
sentry-cocoa-*<yourfavoriteloggingframework>*If going with a repo per integration type, repo name scheme:
sentry-cocoa-<integration-type>@philprime
I believe the option 3 (package-mirror) is the best way, using GitHub workflows to automatically update the downstream packages and tags accordingly. As the integrations are still tightly coupled with the main SDK code, we should keep the code and documentation close to each other. Asking users to add an additional dependency to their project is a good trade-off compared to having to download unnecessary ones (also impacts their CI workflows, e.g. longer download times cause more CI build minutes, cause more costs)
@philipphofmann
I’m also for option 3 because all the code lives in one place, and we only need to use multiple repositories because of Apple's ecosystem package manager limitations. That limitation shouldn’t force us to split up the code across multiple repositories. We should abstract that away as much as we can from the codebase if possible, and that is what option 3 is about.
Steps forward:
Closes #6903