Showing 7 of 7 total issues
Method loop
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def loop()
while true do
uri = URI.parse($base_url + '/control')
resp = Net::HTTP.get(uri)
control = JSON.parse(resp)
Method test_body
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_body(tracer, control)
repeat = control['Repeat']
sleepnano = control['Sleep']
sleepival = control['SleepInterval']
work = control['Work']
Method flush
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def flush
reset_on_fork
return if @span_records.empty?
Method loop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def loop()
while true do
uri = URI.parse($base_url + '/control')
resp = Net::HTTP.get(uri)
control = JSON.parse(resp)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(
tracer:,
operation_name:,
child_of: nil,
references: [],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method configure
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def configure(component_name:,
access_token: nil,
transport: nil, tags: {},
propagator: :lightstep)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method start_span
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def start_span(operation_name, child_of: nil, references: nil, start_time: nil, tags: nil, ignore_active_scope: false)
if child_of.nil? && references.nil? && !ignore_active_scope
child_of = active_span
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"