The LightStep distributed tracing library for Objective-C and Swift
Objective-C Ruby Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Pod
PodInstallTarget
examples
lightstep-tracer-common @ d428e73
.clang-format
.gitignore
.gitmodules
.travis.yml
LICENSE
Makefile
README.md
VERSION
lightstep.podspec
lightstep.podspec.src

README.md

lightstep-tracer-objc

Version License Platform

The LightStep distributed tracing library for Objective-C and Swift.

Installation (CocoaPods)

  1. Ensure you have CocoaPods installed (TL;DR: sudo gem install cocoapods)
  2. Create a Podfile in your Xcode project and add the following line:
pod 'lightstep', '~>3.2'
  1. Run pod install in your project directory. Open the newly created workspace file in Xcode.

Getting started

#import "LSTracer.h"
#import "OTGlobal.h"

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Initialize the LightStep tracer implementation
    LSTracer* tracer = [[LSTracer alloc] initWithToken:@"{your_access_token}"];
    [OTGlobal initSharedTracer:tracer];

    // <Your normal initialization code here>

    return YES;
}

// Elsewhere:
- (void)someFunction:... {

    id<OTSpan> span = [[OTGlobal sharedTracer] startSpan:@"someFunction:"];

    ...

    [span finish];
}