iOS and tvOS Libraries for RUM
이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다.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 requests.
- Configure RUM monitoring by following the Setup guide.
- Enable
URLSessionInstrumentation
for Alamofire.SessionDelegate
:
import Alamofire
import DatadogRUM
URLSessionInstrumentation.enable(with: .init(delegateClass: Alamofire.SessionDelegate.self))
For additional information on sampling rate, distributed tracing, and adding custom attributes to tracked RUM resources, refer to Advanced Configuration > Automatically track network requests.
Apollo GraphQL
Starting from version 2.5.0
, the RUM iOS SDK can automatically track Apollo GraphQL requests.
- Configure RUM monitoring by following the Setup guide.
- Enable
URLSessionInstrumentation
for Apollo.URLSessionClient
:
import Apollo
import DatadogRUM
URLSessionInstrumentation.enable(with: .init(delegateClass: Apollo.URLSessionClient.self))
For additional information on sampling rate, distributed tracing, and adding custom attributes to tracked RUM resources, refer to Advanced Configuration > Automatically track network requests.
SDWebImage
Starting from version 2.5.0
, the RUM iOS SDK can automatically track SDWebImage requests.
- Configure RUM monitoring by following the Setup guide.
- Enable
URLSessionInstrumentation
for SDWebImageDownloader
:
import SDWebImage
import DatadogRUM
URLSessionInstrumentation.enable(with: .init(delegateClass: SDWebImageDownloader.self as! URLSessionDataDelegate.Type))
For additional information on sampling rate, distributed tracing, and adding custom attributes to tracked RUM resources, see Advanced Configuration > Automatically track network requests.
OpenAPI Generator
Starting from version 2.5.0
, the RUM iOS SDK can automatically track OpenAPI Generator requests.
- Configure RUM monitoring by following the Setup guide.
- Create a dummy
URLSessionDataDelegate
. - Enable
URLSessionInstrumentation
for EmptySessionDelegate
. - Configure
URLSession
with your dummy URLSessionDataDelegate
. - Create an OpenAPI client with
.buffered
processing mode.
import DatadogRUM
import OpenAPIRuntime
import OpenAPIURLSession
// Dummy delegate
class EmptySessionDelegate: NSObject, URLSessionDataDelegate {}
// Create `URLSession` with your delegate
let delegate = EmptySessionDelegate()
let urlSession = URLSession(configuration: .default, delegate: delegate, delegateQueue: nil)
// Enable instrumentation for your delegate class
URLSessionInstrumentation.enable(with: .init(delegateClass: EmptySessionDelegate.self))
// Create transport with `.buffered` processing mode (required for proper instrumentation)
let transport = URLSessionTransport(configuration: .init(
session: urlSession,
httpBodyProcessingMode: .buffered
))
// Create the OpenAPI client
bufferedClient = Client(
serverURL: try! Servers.Server1.url(),
transport: transport
)
For additional information on sampling rate, distributed tracing, and adding custom attributes to tracked RUM resources, see Advanced Configuration > Automatically track network requests.