Class: XRayMethodTracer
- Inherits:
-
Object
- Object
- XRayMethodTracer
- Defined in:
- lib/xray_method_tracer.rb
Class Attribute Summary collapse
-
.path_prefix ⇒ Object
dockerなどでWORKDIRを変更した場合に対応するためのprefix.
Instance Attribute Summary collapse
-
#base_klasses ⇒ Object
readonly
Returns the value of attribute base_klasses.
-
#klasses ⇒ Object
readonly
Returns the value of attribute klasses.
Instance Method Summary collapse
-
#initialize(base_klasses: [], klasses: []) ⇒ XRayMethodTracer
constructor
A new instance of XRayMethodTracer.
- #trace ⇒ Object
Constructor Details
#initialize(base_klasses: [], klasses: []) ⇒ XRayMethodTracer
Returns a new instance of XRayMethodTracer.
13 14 15 16 |
# File 'lib/xray_method_tracer.rb', line 13 def initialize(base_klasses: [], klasses: []) @base_klasses = base_klasses @klasses = klasses end |
Class Attribute Details
.path_prefix ⇒ Object
dockerなどでWORKDIRを変更した場合に対応するためのprefix
10 11 12 |
# File 'lib/xray_method_tracer.rb', line 10 def path_prefix @path_prefix end |
Instance Attribute Details
#base_klasses ⇒ Object (readonly)
Returns the value of attribute base_klasses.
7 8 9 |
# File 'lib/xray_method_tracer.rb', line 7 def base_klasses @base_klasses end |
#klasses ⇒ Object (readonly)
Returns the value of attribute klasses.
7 8 9 |
# File 'lib/xray_method_tracer.rb', line 7 def klasses @klasses end |
Instance Method Details
#trace ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/xray_method_tracer.rb', line 18 def trace if empty_klasses? Loggers::TraceLogger.new.warn("At least one klasses or base_klasses is required No Tracing will be done") return end Loggers::TraceLogger.new.info("setup method trace") method_trace_setup = MethodTraceSetUpFactory.create(base_klasses, klasses) method_trace_setup.apply_trace Loggers::TraceLogger.new.info("setup method trace done") end |