Skip to content

SumoLogic/sumologic-opentelemetry-ios

Repository files navigation

Sumo Logic OpenTelemetry RUM for iOS

Features

  • URLSession auto-instrumentation
  • Information about app start
  • Touches, actions and view controllers
  • Support for manual instrumentation

Instalation

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: "...",
)

Configuration

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

Manual instrumentation

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()

License

This project is released under the Apache 2.0 License.

Code Of Conduct

Please refer to our Code of Conduct.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages