-
Notifications
You must be signed in to change notification settings - Fork 133
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
RUMM-883 Add support for 3rd party networking libraries (including Alamofire) #340
RUMM-883 Add support for 3rd party networking libraries (including Alamofire) #340
Conversation
4e5071e
to
45bbbb3
Compare
f068fff
to
5d4ec9b
Compare
8c22098
to
ee0a583
Compare
ee0a583
to
1ef78e3
Compare
1ef78e3
to
4f5d4b0
Compare
As discussed on daily, I created |
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.
Docs review
Co-authored-by: ruthnaebeck <19349244+ruthnaebeck@users.noreply.github.com>
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.
👍 for docs
What and why?
📦 This PR makes it possible to add integrations with 3rd party networking libraries (including Alamofire).
How?
Our network interceptor is pretty straightforward and follows the interception model in Alamofire:
By polishing its interface and making the
URLSessionInterceptor
public, now it is possible to use our SDK withAlamofire
by implementing custom AF'sEventMonitor
(for task start, metrics and completion) and AF'sRequestInterceptor
(for request modification).Implementations of
DDEventMonitor
andDDRequestInterceptor
are provided inSources/DatadogExtensions/Alamofire/
.Those implementations are delivered in
DatadogSDKAlamofireExtension
pod:DatadogAlamofireExtension
for Carthage and SPMIt is not yet possible to distribute
DatadogAlamofireExtension
as SPM package, because dynamic frameworks are still broken in SPM. Doing so, raises the compiler warning of duplicated symbols forDatadog
andKronos
(as those two are (in-)directly linked to the app by bothDatadog
andDatadogAlamofireExtension
dependencies).Distributing
DatadogAlamofireExtension
through Carthage is very inconvenient and may be error-prone for non-Alamofire users, as bothDatadogAlamofireExtension.framework
andAlamofire.framework
will appear inCarthage/Build/iOS
folder. This would require additional explanation in Carthage installation steps for the SDK.Note on
DatadogSDKAlamofireExtension.podspec
Instead of creating separate podspec, I've also considered also adding
AlamofireExtension
subspec toDatadogSDK.podspec
or creatingDatadogSDKExtensions/Alamofire
spec. Neither of this seems valid, as it doesn't scale for other integrations and eventual SPM / Carthage support.Review checklist