Module: AppMap::Hook::RecordAround
- Included in:
- Method
- Defined in:
- lib/appmap/hook/record_around.rb
Overview
Start and stop a recording around a Hook::Method.
Defined Under Namespace
Classes: Context
Constant Summary collapse
- APPMAP_OUTPUT_DIR =
File.join(AppMap.output_dir, "requests")
Instance Method Summary collapse
-
#record_around? ⇒ Boolean
If requests recording is enabled, and we encounter a method which should always be recorded when requests recording is on, and there is no other recording in progress, then start a new recording and end it when the method returns.
- #record_around_after ⇒ Object
- #record_around_before ⇒ Object
Instance Method Details
#record_around? ⇒ Boolean
If requests recording is enabled, and we encounter a method which should always be recorded when requests recording is on, and there is no other recording in progress, then start a new recording and end it when the method returns.
58 59 60 |
# File 'lib/appmap/hook/record_around.rb', line 58 def record_around? (record_around && AppMap.recording_enabled?(:requests) && !AppMap.tracing_enabled?(thread: Thread.current)) end |
#record_around_after ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/appmap/hook/record_around.rb', line 68 def record_around_after return unless @record_around_context context = @record_around_context @record_around_context = nil context.finish end |