Class: ElasticAPM::Spies::MongoSpy::Subscriber Private
- Inherits:
-
Object
- Object
- ElasticAPM::Spies::MongoSpy::Subscriber
- Defined in:
- lib/elastic_apm/spies/mongo.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- TYPE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'db'
- SUBTYPE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'mongodb'
- ACTION =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'query'
Instance Method Summary collapse
- #failed(event) ⇒ Object private
-
#initialize ⇒ Subscriber
constructor
private
A new instance of Subscriber.
- #started(event) ⇒ Object private
- #succeeded(event) ⇒ Object private
Constructor Details
#initialize ⇒ Subscriber
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Subscriber.
38 39 40 |
# File 'lib/elastic_apm/spies/mongo.rb', line 38 def initialize @events = {} end |
Instance Method Details
#failed(event) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 49 50 51 52 |
# File 'lib/elastic_apm/spies/mongo.rb', line 46 def failed(event) if (span = pop_event(event)) span.outcome = Span::Outcome::FAILURE end span end |
#started(event) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 |
# File 'lib/elastic_apm/spies/mongo.rb', line 42 def started(event) push_event(event) end |
#succeeded(event) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 57 58 59 60 |
# File 'lib/elastic_apm/spies/mongo.rb', line 54 def succeeded(event) if span = pop_event(event) span.outcome = Span::Outcome::SUCCESS end span end |