Skip to content
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

Merged

Conversation

ncreated
Copy link
Member

@ncreated ncreated commented Jul 22, 2024

What does this PR do? What is the motivation?

Adding "Integrated Libraries" to guide users on how to instrument Alamofire and Apollo GraphQL with the RUM iOS SDK.

Merge instructions

  • Please merge after reviewing

Additional notes

Relates to changes in dd-sdk-ios: DataDog/dd-sdk-ios#1966

@ncreated ncreated added the WORK IN PROGRESS No review needed, it's a wip ;) label Jul 22, 2024
@ncreated ncreated self-assigned this Jul 22, 2024
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Jul 22, 2024
Copy link
Contributor

@ncreated ncreated changed the title RUM-3060 Add iOS entry in rum-mobile-integrated-libraries.html RUM-3060 Add docs for RUM iOS SDK Integrated Libraries Jul 22, 2024
import Alamofire
import DatadogRUM

URLSessionInstrumentation.enable(with: .init(delegateClass: SessionDelegate.self))
Copy link
Contributor

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.

Copy link
Member Author

@ncreated ncreated Jul 23, 2024

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:

  1. Enable URLSessionInstrumentation for Alamofire.SessionDelegate:

I can make it cleaner by:

Suggested change
URLSessionInstrumentation.enable(with: .init(delegateClass: SessionDelegate.self))
URLSessionInstrumentation.enable(with: .init(delegateClass: Alamofire.SessionDelegate.self))

WDYT @ganeshnj ?

Copy link
Member Author

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 to Alamofire.SessionDelegate doc, but decided to not do it as external links are likely to change making our docs out-of-sync.

import Apollo
import DatadogRUM

URLSessionInstrumentation.enable(with: .init(delegateClass: URLSessionClient.self))
Copy link
Contributor

Choose a reason for hiding this comment

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

/improvement

URLSessionClient is very common name, let's namespace it/

Suggested change
URLSessionInstrumentation.enable(with: .init(delegateClass: URLSessionClient.self))
URLSessionInstrumentation.enable(with: .init(delegateClass: Apollo.URLSessionClient.self))

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍. I also considered linking Apollo.URLSessionClient doc but decided to not do it as external links are likely to change making our docs out-of-sync.

@ganeshnj
Copy link
Contributor

Small doc improvement comments, nothing blocking.

@ncreated ncreated marked this pull request as ready for review July 25, 2024 06:31
@ncreated ncreated requested review from a team as code owners July 25, 2024 06:31
@ncreated ncreated removed the WORK IN PROGRESS No review needed, it's a wip ;) label Jul 25, 2024
@cswatt cswatt merged commit 1b71e17 into master Jul 30, 2024
13 checks passed
@cswatt cswatt deleted the maciek.grzybowski/RUM-3060-add-docs-for-ios-integrations branch July 30, 2024 15:34
rtrieu pushed a commit that referenced this pull request Sep 3, 2024
* RUM-3060 Add iOS entry in rum-mobile-integrated-libraries.html

* RUM-3060 Create itegrated_libraries/ios.md

* RUM-3060 Explain Alamofire and GrapQL integration

* RUM-3060 Fix links

* RUM-3060 Add namespace to instrumented delegate class

* Update content/en/real_user_monitoring/mobile_and_tv_monitoring/integrated_libraries/ios.md

* Update doc link for consistency

---------

Co-authored-by: cecilia saixue watt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants