lib/opentelemetry/trace/tracer.rb in opentelemetry-api-0.5.1 vs lib/opentelemetry/trace/tracer.rb in opentelemetry-api-0.6.0
- old
+ new
@@ -54,10 +54,10 @@
# span to the block.
def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil, with_parent: nil, with_parent_context: nil)
span = start_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind, with_parent: with_parent, with_parent_context: with_parent_context)
with_span(span) { |s, c| yield s, c }
rescue Exception => e # rubocop:disable Lint/RescueException
- span.record_error(e)
+ span.record_exception(e)
span.status = Status.new(Status::UNKNOWN_ERROR,
description: "Unhandled exception of type: #{e.class}")
raise e
ensure
span.finish