URLSession
auto-instrumentation- Information about app start
- Touches, actions and view controllers
- Support for manual instrumentation
Use Swift Package Manager through XCode (Project -> Package Dependencies) or by modifying Package.swift
file:
.package(url: "https://github.com/SumoLogic/sumologic-opentelemetry-ios", from: "1.3.0")
Then initialize this library by calling SumoLogicRum.initialize
, ideally in App.init
or AppDelegate.didFinishLaunchingWithOptions
.
import SumoLogicRum
SumoLogicRum.initialize(
collectionSourceUrl: "...",
)
Parameter | Type | Default | Description |
---|---|---|---|
collectionSourceUrl | String |
required | Sumo Logic collector source url |
serviceName | String |
auto | Name of your service |
applicationName | String |
auto | Name of your application |
enableAppLoadInstrumentation | Bool |
true | |
enableUIInstrumentation | Bool |
true | |
enableURLSessionInstrumentation | Bool |
true | |
enableCrashInstrumentation | Bool |
true |
Use standard OpenTelemetry-Swift API to create spans manually:
import OpenTelemetryApi
import OpenTelemetrySdk
let tracer = OpenTelemetry.instance.tracerProvider.get(instrumentationName: "app", instrumentationVersion: "0.0.1")
let span = tracer.spanBuilder(spanName: "your operation name").startSpan()
OpenTelemetry.instance.contextProvider.setActiveSpan(span)
span.end()
This project is released under the Apache 2.0 License.
Please refer to our Code of Conduct.