Module: Trailblazer::Pro::Operation::Call

Defined in:
lib/trailblazer/pro/operation/call.rb

Instance Method Summary collapse

Instance Method Details

#call_with_public_interface(options, flow_options, **circuit_options) ⇒ Object

This is the monkey-patch for Operation.call. Here we decide whether to use tracing, and what to render, or if we should bypass tracing.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/trailblazer/pro/operation/call.rb', line 9

def call_with_public_interface(options, flow_options, **circuit_options)
  trace_strategy, present_options_merge = Pro::Session.trace_guards.(self, options)

  if trace_strategy
    # trace_strategy.invoke(activity, [ctx, {}], present_options: present_options_merge)

      # local invoke_class is overridden by circuit_options
    super(options, flow_options, invoke_class: trace_strategy, **circuit_options, present_options: present_options_merge)
  else
    super
  end
end