Module: BrainzLab::Instrumentation::MongoDBInstrumentation
- Defined in:
- lib/brainzlab/instrumentation/mongodb.rb
Defined Under Namespace
Classes: CommandSubscriber
Class Method Summary
collapse
Class Method Details
.install! ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/brainzlab/instrumentation/mongodb.rb', line 9
def install!
return if @installed
installed_any = false
if defined?(::Mongo::Client)
install_mongo_driver!
installed_any = true
end
if defined?(::Mongoid)
install_mongoid!
installed_any = true
end
return unless installed_any
@installed = true
BrainzLab.debug_log('MongoDB instrumentation installed')
end
|
.installed? ⇒ Boolean
32
33
34
|
# File 'lib/brainzlab/instrumentation/mongodb.rb', line 32
def installed?
@installed
end
|
.reset! ⇒ Object
36
37
38
|
# File 'lib/brainzlab/instrumentation/mongodb.rb', line 36
def reset!
@installed = false
end
|