appsignal-elasticsearch 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecf0ec7d2d0c193c5ff83b47cf9ddfd176b0c544
4
- data.tar.gz: d7499be2df4679ddc9da61caa3450f65c52cdab2
3
+ metadata.gz: f86fd09f566803c516961829d2ebd7d455f2d149
4
+ data.tar.gz: 72a93fbe9d762183290fee04f5f01319f316314a
5
5
  SHA512:
6
- metadata.gz: 90fd8e4281ab735ed5a7e5e5a78368d6d28b46737f59c5b8ec8ade1a67b431fbc984d6d9f9592322da7829f66248fb01f2be128a6a5717e237b9b0024f6bf1c8
7
- data.tar.gz: 357778c1fea233783e88c03812c20abf4df217d6a692213d841b3a0305fd37ba74166b7a3b7f8f2558bab64483ffb165925f7a02dbdabc057ef7eda7c620cae4
6
+ metadata.gz: 8cb140afa1ac12466a871939ba2edf80b4a84478546719c32ac52daf4e22ccb2f3bd9a90b6e2895f998f840b153f5c974f376bd4a4a6abc97289b04efc4f7413
7
+ data.tar.gz: 0347b07547ab226df5f02c54ca5ad77172735977d9f8812e3d1acbda7518ae8085dac02eb591f3691eed7b041a1ef1a30cbfed980b9869fd9d685a8c505011db
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ vendor/
10
10
  .bundle/
11
11
  .sass-cache/
12
12
  tmp/
13
+ pkg/
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/appsignal-elasticsearch/version', __FILE__)
2
+ require File.expand_path('../lib/appsignal/elasticsearch/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ['Mike Kim']
@@ -1,25 +1 @@
1
- require 'elasticsearch'
2
- require 'active_support'
3
-
4
- module Appsignal
5
- module Elasticsearch
6
- module Instrumentation
7
-
8
- def perform_request_with_appsignal_instrumentation(method, path, params, body, &block)
9
- args = { method: method, path: path, params: params, body: body }
10
- ActiveSupport::Notifications.instrument(
11
- 'query.elasticsearch', :query => args) do
12
- perform_request_without_appsignal_instrumentation(method, path, params, body, &block)
13
- end
14
- end
15
-
16
- end
17
- end
18
- end
19
-
20
- ::Elasticsearch::Transport::Client.class_eval do
21
- include Appsignal::Elasticsearch::Instrumentation
22
-
23
- alias_method :perform_request_without_appsignal_instrumentation, :perform_request
24
- alias_method :perform_request, :perform_request_with_appsignal_instrumentation
25
- end
1
+ require 'appsignal/elasticsearch'
data/lib/appsignal.rb ADDED
@@ -0,0 +1,2 @@
1
+ module Appsignal
2
+ end
@@ -0,0 +1,7 @@
1
+ require 'appsignal/elasticsearch/instrumentation'
2
+ require 'appsignal/elasticsearch/version'
3
+
4
+ module Appsignal
5
+ module Elasticsearch
6
+ end
7
+ end
@@ -0,0 +1,24 @@
1
+ require 'elasticsearch'
2
+ require 'active_support'
3
+
4
+ module Appsignal
5
+ module Elasticsearch
6
+ module Instrumentation
7
+ def perform_request_with_appsignal_instrumentation(method, path, params, body, &block)
8
+ args = { method: method, path: path, params: params, body: body }
9
+ ActiveSupport::Notifications.instrument(
10
+ 'query.elasticsearch', :query => args) do
11
+ perform_request_without_appsignal_instrumentation(method, path, params, body, &block)
12
+ end
13
+ end
14
+
15
+ end
16
+ end
17
+ end
18
+
19
+ ::Elasticsearch::Transport::Client.class_eval do
20
+ include Appsignal::Elasticsearch::Instrumentation
21
+
22
+ alias_method :perform_request_without_appsignal_instrumentation, :perform_request
23
+ alias_method :perform_request, :perform_request_with_appsignal_instrumentation
24
+ end
@@ -1,5 +1,5 @@
1
1
  module Appsignal
2
2
  module Elasticsearch
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Kim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appsignal
@@ -123,7 +123,10 @@ files:
123
123
  - Rakefile
124
124
  - appsignal-elasticsearch.gemspec
125
125
  - lib/appsignal-elasticsearch.rb
126
- - lib/appsignal-elasticsearch/version.rb
126
+ - lib/appsignal.rb
127
+ - lib/appsignal/elasticsearch.rb
128
+ - lib/appsignal/elasticsearch/instrumentation.rb
129
+ - lib/appsignal/elasticsearch/version.rb
127
130
  - spec/appsignal_elasticsearch_spec.rb
128
131
  - spec/spec_helper.rb
129
132
  homepage: https://github.com/mykoweb/appsignal-elasticsearch