newrelic_mongo 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.
- data/README.md +20 -2
- data/lib/newrelic_mongo/instrumentation/mongoid.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
|
@@ -13,9 +13,27 @@ https://github.com/stevebartholomew/newrelic_moped
|
|
|
13
13
|
|
|
14
14
|
## Getting Started
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Add the `newrelic_mongo` gem to your Gemfile.
|
|
17
|
+
|
|
18
|
+
## Instrumentation
|
|
19
|
+
|
|
20
|
+
### Mongo Ruby Driver
|
|
21
|
+
|
|
22
|
+
For the mongo ruby driver, the following instrumentation is added:
|
|
23
|
+
|
|
24
|
+
`Database/COLLECTION_NAME/ACTION`
|
|
25
|
+
|
|
26
|
+
Where ACTION is Find, Refresh, Update, Close, etc..
|
|
27
|
+
|
|
28
|
+
### Mongoid 2.x
|
|
29
|
+
|
|
30
|
+
For Mongoid 2.x, the following instrumentation is added:
|
|
31
|
+
|
|
32
|
+
`Mongoid/CLASSNAME/OPERATION`
|
|
33
|
+
|
|
34
|
+
Where OPERATION is any operation in `Mongoid::Collections::Operations::ALL` (except for `<<` and `[]`).
|
|
17
35
|
|
|
18
36
|
## Contributing
|
|
19
37
|
|
|
20
38
|
I welcome bug fixes and new features. Fork the repo, make your changes, and then
|
|
21
|
-
submit a pull request.
|
|
39
|
+
submit a pull request. Thanks in advance!
|
|
@@ -14,7 +14,7 @@ DependencyDetection.defer do
|
|
|
14
14
|
include NewRelic::Agent::MethodTracer
|
|
15
15
|
|
|
16
16
|
(Mongoid::Collections::Operations::ALL - [:<<, :[]]).each do |method|
|
|
17
|
-
add_method_tracer method, "
|
|
17
|
+
add_method_tracer method, "Mongoid/\#{@klass}/#{method}"
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: newrelic_mongo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.0.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Raphael Crawford-Marks
|