Skip to content

Commit

Permalink
Rename to activerecord-opentracing
Browse files Browse the repository at this point in the history
  • Loading branch information
indrekj committed Jul 9, 2018
1 parent 5cb410a commit e802d89
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ RSpec/NestedGroups:
RSpec/ExampleLength:
Enabled: no

RSpec/FilePath:
Enabled: no

RSpec/MultipleExpectations:
Enabled: no

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ActiveRecord::Tracer
# ActiveRecord::OpenTracing

Adds OpenTracing instrumentation to ActiveRecord

Expand All @@ -7,7 +7,7 @@ Adds OpenTracing instrumentation to ActiveRecord
Add this line to your application's Gemfile:

```ruby
gem 'active_record-tracer'
gem 'activerecord-opentracing'
```

## Usage
Expand All @@ -16,8 +16,8 @@ gem 'active_record-tracer'
require 'opentracing'
OpenTracing.global_tracer = TracerImplementation.new

require 'active_record/tracer'
ActiveRecord::Tracer.instrument
require 'active_record/opentracing'
ActiveRecord::OpenTracing.instrument
```

## Development
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'active_record/tracer/version'
require 'active_record/opentracing/version'

Gem::Specification.new do |spec|
spec.name = 'active_record-tracer'
spec.version = ActiveRecord::Tracer::VERSION
spec.name = 'activerecord-opentracing'
spec.version = ActiveRecord::OpenTracing::VERSION
spec.authors = ['SaleMove TechMovers']
spec.email = ['techmovers@salemove.com']

spec.summary = 'ActiveRecord OpenTracing tracer'
spec.summary = 'ActiveRecord OpenTracing intrumenter'
spec.description = ''
spec.homepage = ''
spec.homepage = 'https://github.com/salemove/ruby-activerecord-opentracing'
spec.license = 'MIT'

# Specify which files should be added to the gem when it is released.
Expand Down
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

require 'bundler/setup'
require 'active_record/tracer'
require 'active_record/opentracing'

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
require 'active_record'
require 'opentracing'

require 'active_record/tracer/version'
require 'active_record/tracer/processor'
require 'active_record/opentracing/version'
require 'active_record/opentracing/processor'

module ActiveRecord
module Tracer
def self.instrument(tracer: OpenTracing.global_tracer)
module OpenTracing
def self.instrument(tracer: ::OpenTracing.global_tracer)
processor = Processor.new(tracer)

ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module ActiveRecord
module Tracer
module OpenTracing
class Processor
DEFAULT_OPERATION_NAME = 'sql.query'.freeze
COMPONENT_NAME = 'ActiveRecord'.freeze
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module ActiveRecord
module Tracer
module OpenTracing
VERSION = '0.1.1'.freeze
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RSpec.describe ActiveRecord::Tracer do
RSpec.describe ActiveRecord::OpenTracing do
let(:tracer) { OpenTracingTestTracer.build }

before do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'bundler/setup'
require 'active_record/tracer'
require 'active_record/opentracing'
require 'opentracing_test_tracer'

RSpec.configure do |config|
Expand Down

0 comments on commit e802d89

Please sign in to comment.