0.0
No commit activity in last 3 years
No release in over 3 years
Splunk OpenTracing Ruby bindings
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5
~> 2.0
~> 11.3
~> 3.0
~> 0.16
~> 0.8.0

Runtime

 Project Readme

splunk-tracer-ruby

MIT license

The Splunk OpenTracing library for Ruby.

Installation

Add this line to your application's Gemfile:

gem 'splunk-tracer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install splunk-tracer

Getting started

require 'splunktracing'

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

# Create a basic span and attach a log to the span
span = SplunkTracing.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 = SplunkTracing.start_span('my_child', child_of: span.span_context)
sleep(0.2)
child.finish
sleep(0.1)
span.finish

Thread Safety

The Splunk 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 Splunk 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.

This library is the Splunk binding for OpenTracing. See the OpenTracing Ruby API for additional detail.

License

The Splunk Tracer for Ruby is licensed under the MIT License. Details can be found in the LICENSE file.

Third-party libraries

This is a fork of the Ruby tracer from Lightstep, which is also licensed under the MIT License. Links to the original repository and license are below: