Class: Atatus::Spies::MongoSpy::Subscriber Private
- Inherits:
-
Object
- Object
- Atatus::Spies::MongoSpy::Subscriber
- Defined in:
- lib/atatus/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'
- EVENT_KEY =
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.
:__atatus_instrumenter_mongo_events_key
Instance Method Summary collapse
- #events ⇒ Object private
- #failed(event) ⇒ Object private
- #started(event) ⇒ Object private
- #succeeded(event) ⇒ Object private
Instance Method Details
#events ⇒ 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.
40 41 42 |
# File 'lib/atatus/spies/mongo.rb', line 40 def events Thread.current[EVENT_KEY] ||= [] end |
#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.
48 49 50 51 52 53 54 |
# File 'lib/atatus/spies/mongo.rb', line 48 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.
44 45 46 |
# File 'lib/atatus/spies/mongo.rb', line 44 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.
56 57 58 59 60 61 62 |
# File 'lib/atatus/spies/mongo.rb', line 56 def succeeded(event) if span = pop_event(event) span.outcome = Span::Outcome::SUCCESS end span end |