-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RUM-3060 Add docs for RUM iOS SDK Integrated Libraries #24253
Changes from 4 commits
b83fa58
c71d7ae
4f63b6c
6310e9d
bf8db03
e7e77a3
cbdecb5
a146356
07d5967
1a94999
3d323a8
fd5a16a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,52 @@ | ||||||
--- | ||||||
title: iOS and tvOS Libraries for RUM | ||||||
code_lang: ios | ||||||
type: multi-code-lang | ||||||
code_lang_weight: 10 | ||||||
aliases: | ||||||
- /real_user_monitoring/ios/integrated_libraries/ | ||||||
further_reading: | ||||||
- link: https://github.com/DataDog/dd-sdk-ios | ||||||
tag: "Source Code" | ||||||
text: Source code for dd-sdk-ios | ||||||
- link: /real_user_monitoring/mobile_and_tv_monitoring/integrated_libraries | ||||||
tag: Documentation | ||||||
text: Integrated Libraries | ||||||
--- | ||||||
|
||||||
This page lists integrated libraries you can use for iOS and tvOS applications. | ||||||
|
||||||
## Alamofire | ||||||
|
||||||
Starting from version `2.5.0`, the RUM iOS SDK can automatically track [Alamofire][1] requests. | ||||||
|
||||||
1. Configure RUM monitoring by following the [Setup][2] guide. | ||||||
2. Enable `URLSessionInstrumentation` for `Alamofire.SessionDelegate`: | ||||||
|
||||||
```swift | ||||||
import Alamofire | ||||||
import DatadogRUM | ||||||
|
||||||
URLSessionInstrumentation.enable(with: .init(delegateClass: SessionDelegate.self)) | ||||||
``` | ||||||
For additional information on sampling rate, distributed tracing, and adding custom attributes to tracked RUM resources, refer to "Automatically track network requests" in the [Advanced Configuration][4] documentation. | ||||||
ncreated marked this conversation as resolved.
Show resolved
Hide resolved
ncreated marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
## Apollo GraphQL | ||||||
|
||||||
Starting from version `2.5.0`, the RUM iOS SDK can automatically track [Apollo GraphQL][3] requests. | ||||||
|
||||||
1. Configure RUM monitoring by following the [Setup][2] guide. | ||||||
2. Enable `URLSessionInstrumentation` for `Apollo.URLSessionClient`: | ||||||
|
||||||
```swift | ||||||
import Apollo | ||||||
import DatadogRUM | ||||||
|
||||||
URLSessionInstrumentation.enable(with: .init(delegateClass: URLSessionClient.self)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. /improvement
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done 👍. I also considered linking |
||||||
``` | ||||||
For additional information on sampling rate, distributed tracing, and adding custom attributes to tracked RUM resources, refer to "Automatically track network requests" in the [Advanced Configuration][4] documentation. | ||||||
cswatt marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
[1]: https://github.com/Alamofire/Alamofire | ||||||
[2]: https://docs.datadoghq.com/real_user_monitoring/mobile_and_tv_monitoring/setup/ios/ | ||||||
[3]: https://github.com/apollographql/apollo-ios | ||||||
[4]: https://docs.datadoghq.com/real_user_monitoring/mobile_and_tv_monitoring/advanced_configuration/ios/#automatically-track-network-requests |
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.
/improvement
have seen some customer asking where is
SessionDelegate
type.We should make sure from docs that it clearly states that
SessionDelegate
is a customer type and implemented in their app.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.
It is Alamofire's type 🤔 💭. Which is already covered in:
I can make it cleaner by:
WDYT @ganeshnj ?
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.
Ultimately, I decided to add
Alamofire.
namespace, same as for Apollo. I also considered linking toAlamofire.SessionDelegate
doc, but decided to not do it as external links are likely to change making our docs out-of-sync.