lib/opentracing/span.rb in opentracing-0.3.2 vs lib/opentracing/span.rb in opentracing-0.4.0.rc1

- old
+ new

@@ -38,14 +38,26 @@ # @return [String] value of the baggage item def get_baggage_item(key) nil end + # @deprecated Use {#log_kv} instead. + # Reason: event is an optional standard log field defined in spec and not required. Also, + # method name {#log_kv} is more consistent with other language implementations such as Python and Go. + # # Add a log entry to this span # @param event [String] event name for the log # @param timestamp [Time] time of the log # @param fields [Hash] Additional information to log def log(event: nil, timestamp: Time.now, **fields) + warn "Span#log is deprecated. Please use Span#log_kv instead." + nil + end + + # Add a log entry to this span + # @param timestamp [Time] time of the log + # @param fields [Hash] Additional information to log + def log_kv(timestamp: Time.now, **fields) nil end # Finish the {Span} # @param end_time [Time] custom end time, if not now