Module: AppPerf::Instruments::Redis

Defined in:
lib/app_perf_rpm/instruments/redis.rb

Instance Method Summary collapse

Instance Method Details

#call_pipeline_with_trace(pipeline) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/app_perf_rpm/instruments/redis.rb', line 14

def call_pipeline_with_trace(pipeline)
  if ::AppPerfRpm::Tracer.tracing?
    ::AppPerfRpm::Tracer.trace("redis") do |span|
      call_pipeline_without_trace(pipeline)
    end
  else
    call_pipeline_without_trace(pipeline)
  end
end

#call_with_trace(command, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/app_perf_rpm/instruments/redis.rb', line 4

def call_with_trace(command, &block)
  if ::AppPerfRpm::Tracer.tracing?
    ::AppPerfRpm::Tracer.trace("redis") do |span|
      call_without_trace(command, &block)
    end
  else
    call_without_trace(command, &block)
  end
end