appsignal-elasticsearch 0.0.3 → 0.0.4
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/appsignal-elasticsearch.gemspec +1 -2
- data/lib/appsignal-elasticsearch.rb +25 -1
- data/lib/{appsignal/elasticsearch → appsignal-elasticsearch}/version.rb +1 -1
- metadata +3 -6
- data/lib/appsignal.rb +0 -2
- data/lib/appsignal/elasticsearch.rb +0 -7
- data/lib/appsignal/elasticsearch/instrumentation.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d884e188bd33750a43b2bb8c0378d16938dae9
|
4
|
+
data.tar.gz: 26ccd4542de5354f334e722382982129efc98c32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00fc18cf9d67c44a433c1e37ccf36b35d04ded034f776eb4e4588fa6f8a4218b9c877e0a92d835c0b16c752c0073c0b372e71577fd5f9212a6947d2eb38ba563
|
7
|
+
data.tar.gz: 4a7bbb4a31b9cef220cc4710fc8350f8b0fdf4e42388b8df00f2afb6b20b17a2a49d9faa9f245ef2ec206506fe17e6e82d6e2b7250931ee1f13d77f5f58deacf
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require 'appsignal'
|
3
|
-
require File.expand_path('../lib/appsignal/elasticsearch/version', __FILE__)
|
2
|
+
require File.expand_path('../lib/appsignal-elasticsearch/version', __FILE__)
|
4
3
|
|
5
4
|
Gem::Specification.new do |gem|
|
6
5
|
gem.authors = ['Mike Kim']
|
@@ -1 +1,25 @@
|
|
1
|
-
require '
|
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
|
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.4
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appsignal
|
@@ -123,10 +123,7 @@ files:
|
|
123
123
|
- Rakefile
|
124
124
|
- appsignal-elasticsearch.gemspec
|
125
125
|
- lib/appsignal-elasticsearch.rb
|
126
|
-
- lib/appsignal.rb
|
127
|
-
- lib/appsignal/elasticsearch.rb
|
128
|
-
- lib/appsignal/elasticsearch/instrumentation.rb
|
129
|
-
- lib/appsignal/elasticsearch/version.rb
|
126
|
+
- lib/appsignal-elasticsearch/version.rb
|
130
127
|
- spec/appsignal_elasticsearch_spec.rb
|
131
128
|
- spec/spec_helper.rb
|
132
129
|
homepage: https://github.com/mykoweb/appsignal-elasticsearch
|
data/lib/appsignal.rb
DELETED
@@ -1,24 +0,0 @@
|
|
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
|