Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lightstep/lightstep-tracer-objc
The Lightstep distributed tracing library for Objective-C and Swift
https://github.com/lightstep/lightstep-tracer-objc
opentracing
Last synced: 8 days ago
JSON representation
The Lightstep distributed tracing library for Objective-C and Swift
- Host: GitHub
- URL: https://github.com/lightstep/lightstep-tracer-objc
- Owner: lightstep
- License: mit
- Created: 2016-02-24T01:05:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-15T21:03:10.000Z (about 1 year ago)
- Last Synced: 2024-04-24T14:30:00.098Z (7 months ago)
- Topics: opentracing
- Language: Objective-C
- Homepage: https://lightstep.com
- Size: 5.4 MB
- Stars: 11
- Watchers: 72
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# lightstep-tracer-objc
> ❗ **This legacy instrumentation is no longer recommended**. Please review [documentation on setting up and configuring OpenTelemetry Swift](https://github.com/open-telemetry/opentelemetry-swift).
[![Version](https://img.shields.io/cocoapods/v/lightstep.svg?style=flat)](http://cocoapods.org/pods/lightstep)
[![License](https://img.shields.io/cocoapods/l/lightstep.svg?style=flat)](http://cocoapods.org/pods/lightstep)
[![Platform](https://img.shields.io/cocoapods/p/lightstep.svg?style=flat)](http://cocoapods.org/pods/lightstep)The LightStep distributed tracing library for Objective-C and Swift.
## Installation (CocoaPods)
1. Ensure you have [CocoaPods installed](https://guides.cocoapods.org/using/getting-started.html) (TL;DR: `sudo gem install cocoapods`)
2. Create a `Podfile` in your Xcode project and add the following line:```ruby
pod 'lightstep', '~>3.2'
```3. Run `pod install` in your project directory. Open the newly created workspace file in Xcode.
## Installation (Carthage)
Add following line to your `Cartfile`:
```
github "lightstep/lightstep-tracer-objc" ~> 3.0
```## Getting started
```objectivec
#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];//
return YES;
}// Elsewhere:
- (void)someFunction:... {id span = [[OTGlobal sharedTracer] startSpan:@"someFunction:"];
...
[span finish];
}
```* For more info on OpenTracing, see [opentracing.io](http://opentracing.io).