The LightStep distributed tracing library for Ruby
Перейти к файлу
Matthew Wear 7fc80df4f3
Prepare v 0.15.1 release (#90)
* Reset version

The publish process will bump the version for us

* Temporarily remove B3 propagator option
2019-11-06 16:37:32 -08:00
.circleci B3 context propagation (#86) 2019-10-24 14:27:25 -07:00
benchmark Fixes rack example (#58) 2017-04-06 10:20:52 -07:00
bin rename gem and bump to version 0.9.0 2016-10-31 13:38:31 -04:00
examples Migrate to CircleCI 2.0 (#65) 2018-08-07 14:39:02 -07:00
lib Prepare v 0.15.1 release (#90) 2019-11-06 16:37:32 -08:00
scripts rename gem and bump to version 0.9.0 2016-10-31 13:38:31 -04:00
spec ensure scope and span are properly cleaned up in the event of an error (#89) 2019-11-06 14:30:20 -08:00
.gitignore update gitignore 2019-09-04 10:58:40 -04:00
.rspec Normalize to Ruby conventions 2016-04-07 17:16:29 -07:00
.rubocop.yml Various cleanups, add SSL/timeout configuration to HTTPJSON, properly log collector errors 2018-09-18 09:11:05 -05:00
CHANGELOG.md Prepare v 0.15.1 release (#90) 2019-11-06 16:37:32 -08:00
Gemfile Bump version 2017-02-15 22:08:55 -08:00
Gemfile.lock Prepare v 0.15.1 release (#90) 2019-11-06 16:37:32 -08:00
LICENSE.txt Normalize to Ruby conventions 2016-04-07 17:16:29 -07:00
Makefile update changelog, readme 2019-09-04 15:35:59 -04:00
README.md Prepare v 0.15.1 release (#90) 2019-11-06 16:37:32 -08:00
Rakefile rubocop -a 2016-10-28 16:27:50 -04:00
benchmark.rb Setup a NoOp Tracer impl 2017-01-17 13:56:14 -08:00
example.rb Various cleanups, add SSL/timeout configuration to HTTPJSON, properly log collector errors 2018-09-18 09:11:05 -05:00
lightstep.gemspec Update to the latest version of OpenTracing gem and update dependencies. (#82) 2019-08-27 14:18:43 -04:00

README.md

lightstep-tracer-ruby

Gem Version Circle CI MIT license Code Climate

The LightStep distributed tracing library for Ruby.

Installation

Add this line to your application's Gemfile:

gem 'lightstep'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lightstep

Getting started

require 'lightstep'

# Initialize the singleton tracer
LightStep.configure(component_name: 'lightstep/ruby/example', access_token: 'your_access_token')

# Create a basic span and attach a log to the span
span = LightStep.start_span('my_span')
span.log(event: 'hello world', count: 42)

# Create a child span (and add some artificial delays to illustrate the timing)
sleep(0.1)
child = LightStep.start_span('my_child', child_of: span.span_context)
sleep(0.2)
child.finish
sleep(0.1)
span.finish

Thread Safety

The LightStep Tracer is threadsafe. For increased performance, you can add the concurrent-ruby-ext gem to your Gemfile. This will enable C extensions for concurrent operations.

The LightStep Tracer is also Fork-safe. When forking, the child process will not inherit the unflushed spans of the parent, so they will only be flushed once.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run make test to run the tests.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.