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 +4 -4
- data/.gitignore +1 -0
- data/appsignal-elasticsearch.gemspec +1 -1
- data/lib/appsignal-elasticsearch.rb +1 -25
- data/lib/appsignal.rb +2 -0
- data/lib/appsignal/elasticsearch.rb +7 -0
- data/lib/appsignal/elasticsearch/instrumentation.rb +24 -0
- data/lib/{appsignal-elasticsearch → appsignal/elasticsearch}/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f86fd09f566803c516961829d2ebd7d455f2d149
|
4
|
+
data.tar.gz: 72a93fbe9d762183290fee04f5f01319f316314a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cb140afa1ac12466a871939ba2edf80b4a84478546719c32ac52daf4e22ccb2f3bd9a90b6e2895f998f840b153f5c974f376bd4a4a6abc97289b04efc4f7413
|
7
|
+
data.tar.gz: 0347b07547ab226df5f02c54ca5ad77172735977d9f8812e3d1acbda7518ae8085dac02eb591f3691eed7b041a1ef1a30cbfed980b9869fd9d685a8c505011db
|
data/.gitignore
CHANGED
@@ -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,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
|
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.
|
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-
|
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
|
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
|