newrelic_mongodb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/newrelic_mongodb/instrumentation.rb +2 -19
- data/lib/newrelic_mongodb/version.rb +1 -1
- metadata +2 -3
- data/CHANGELOG.md +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 976422c929ae7949cacd18dd6f706eb733a18c54
|
4
|
+
data.tar.gz: e0a059ae5504ca90205a4f3e182b361540184578
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91d05e6c28f9266e8e0d11c253b05e7de0a15a00ddebe96f9afe2cc6e8e4050f4c06d44cafe887d3eacd5e110054b9030bb15d349567b9929ccb254041c9af17
|
7
|
+
data.tar.gz: 22348e549e86d6c6942185fa335a995d2a9fcfca3e0f65a5ca763b3693365c7f12f83a4248e2941438299c5d77fa42a3200c15d4e260734ea7ea276b338b0434
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# New Relic Mongodb
|
1
|
+
# New Relic Mongodb
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/newrelic_mongodb.svg)](https://badge.fury.io/rb/newrelic_mongodb.svg)
|
3
|
+
[![Build Status](https://travis-ci.org/weeyum/newrelic_mongodb.svg)](https://travis-ci.org/weeyum/newrelic_mongodb)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/weeyum/newrelic_mongodb/badge.svg?branch=master&service=github)](https://coveralls.io/github/weeyum/newrelic_mongodb?branch=master)
|
2
5
|
|
3
6
|
New Relic instrumentation for Mongo (2.1.0) / Mongoid (5.x)
|
4
7
|
|
@@ -28,26 +28,9 @@ module NewRelic
|
|
28
28
|
module Mongodb
|
29
29
|
def logging_with_newrelic_trace(messages, operation_id = nil)
|
30
30
|
operation_name, collection_name = determine_operation_and_collection(messages.first)
|
31
|
-
command = Proc.new { logging_without_newrelic_trace(messages, operation_id) }
|
32
31
|
|
33
|
-
|
34
|
-
|
35
|
-
when *%w(find get_more query) then 'find'
|
36
|
-
when *%w(insert update) then 'save'
|
37
|
-
else
|
38
|
-
nil
|
39
|
-
end
|
40
|
-
|
41
|
-
if operation_type
|
42
|
-
callback = Proc.new do |result, metric, elapsed|
|
43
|
-
NewRelic::Agent::Datastores.notice_statement(operation_name, elapsed)
|
44
|
-
end
|
45
|
-
|
46
|
-
NewRelic::Agent::Datastores.wrap('MongoDB', operation_type, collection_name, callback) do
|
47
|
-
command.call
|
48
|
-
end
|
49
|
-
else
|
50
|
-
command.call
|
32
|
+
NewRelic::Agent::Datastores.wrap('MongoDB', operation_name, collection_name, ->(result, metric, elapsed){ NewRelic::Agent::Datastores.notice_statement(operation_name, elapsed) }) do
|
33
|
+
logging_without_newrelic_trace(messages, operation_id)
|
51
34
|
end
|
52
35
|
end
|
53
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_mongodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: newrelic_rpm
|
@@ -79,7 +79,6 @@ executables: []
|
|
79
79
|
extensions: []
|
80
80
|
extra_rdoc_files: []
|
81
81
|
files:
|
82
|
-
- CHANGELOG.md
|
83
82
|
- LICENSE
|
84
83
|
- README.md
|
85
84
|
- lib/newrelic_mongodb.rb
|
data/CHANGELOG.md
DELETED
File without changes
|