Adds OpenTracing instrumentation to ActiveRecord
Add this line to your application's Gemfile:
gem 'activerecord-instrumentation'
require 'opentracing'
OpenTracing.global_tracer = TracerImplementation.new
require 'active_record/open_tracing'
# If a sanitizer is specified, it will be used to scrub the sql statements. This is optional.
sanitizer = ActiveRecord::OpenTracing::SqlSanitizer.build_sanitizer(:mysql)
ActiveRecord::OpenTracing.instrument(sanitizer: sanitizer)
You can find the documentation by going to CircleCI, looking for the build
job, going to Artifacts and clicking on index.html
. A visual guide on this can be found in our wiki at Gems Development: Where to find documentation for our gems.
After checking out the repo, run bundle install
to install dependencies. Then, run rake spec
to run the tests.
You can also run bundle console
for an interactive prompt that will allow you to experiment.
This repository uses a gem publishing mechanism on the CI configuration, meaning most work related with cutting a new version is done automatically.
To release a new version, follow the wiki instructions.