newrelic_mongodb 0.1.0 → 0.1.1

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: 0265cccf0bf07d2e3643690dc529f817d3f9a10e
4
- data.tar.gz: 6e6ec0df1e0c1a2bbfc49dd92e097e59ef623602
3
+ metadata.gz: 976422c929ae7949cacd18dd6f706eb733a18c54
4
+ data.tar.gz: e0a059ae5504ca90205a4f3e182b361540184578
5
5
  SHA512:
6
- metadata.gz: 885f137fdf365cab9dcd0fc2c7fd4ec6bd38ae00456371ad3ff8a36b83e67cfe9e4ca0a2e60371ddd72f1acabfc4436004afe75d60ca9e5f13a5875b4487178f
7
- data.tar.gz: 47a8c7754407f8e884afda65d8a9d465e33745398ff97b1f5ae0364a4c41d9433e09534815dad7ff6376e9c16978c0e3609937a7bed023bff075f588a15e8fa3
6
+ metadata.gz: 91d05e6c28f9266e8e0d11c253b05e7de0a15a00ddebe96f9afe2cc6e8e4050f4c06d44cafe887d3eacd5e110054b9030bb15d349567b9929ccb254041c9af17
7
+ data.tar.gz: 22348e549e86d6c6942185fa335a995d2a9fcfca3e0f65a5ca763b3693365c7f12f83a4248e2941438299c5d77fa42a3200c15d4e260734ea7ea276b338b0434
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # New Relic Mongodb [![Build Status](https://travis-ci.org/weeyum/newrelic_mongodb.svg)](https://travis-ci.org/weeyum/newrelic_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
- operation_type = case operation_name.to_s
34
- when *%w(delete) then 'destroy'
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
 
@@ -1,3 +1,3 @@
1
1
  module NewrelicMongodb
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-26 00:00:00.000000000 Z
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