lib/opentelemetry/trace/tracer.rb in opentelemetry-api-0.17.0 vs lib/opentelemetry/trace/tracer.rb in opentelemetry-api-1.0.0.rc1
- old
+ new
@@ -21,12 +21,12 @@
# On exit, the Span that was active before calling this method will be reactivated. If an
# exception occurs during the execution of the provided block, it will be recorded on the
# span and reraised.
# @yield [span, context] yields the newly created span and a context containing the
# span to the block.
- def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil, with_parent: nil)
+ def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
span = nil
- span = start_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind, with_parent: with_parent)
+ span = start_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind)
Trace.with_span(span) { |s, c| yield s, c }
rescue Exception => e # rubocop:disable Lint/RescueException
span&.record_exception(e)
span&.status = Status.new(Status::ERROR,
description: "Unhandled exception of type: #{e.class}")