lib/opentelemetry/trace/span.rb in opentelemetry-api-0.2.0 vs lib/opentelemetry/trace/span.rb in opentelemetry-api-0.3.0

- old
+ new

@@ -43,11 +43,11 @@ end # Set attribute # # Note that the OpenTelemetry project - # {https://github.com/open-telemetry/opentelemetry-specification/blob/master/semantic-conventions.md + # {https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md # documents} certain "standard attributes" that have prescribed semantic # meanings. # # @param [String] key # @param [String, Boolean, Numeric] value @@ -69,26 +69,34 @@ # Lazy example: # # span.add_event { tracer.create_event(name: 'event', attributes: {'eager' => false}) } # # Note that the OpenTelemetry project - # {https://github.com/open-telemetry/opentelemetry-specification/blob/master/semantic-conventions.md + # {https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md # documents} certain "standard event names and keys" which have # prescribed semantic meanings. # # @param [optional String] name Optional name of the event. This is # required if a block is not given. - # @param [optional Hash<String, Object>] attributes One or more key:value - # pairs, where the keys must be strings and the values may be string, - # boolean or numeric type. This argument should only be used when - # passing in a name. + # @param [optional Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] + # attributes One or more key:value pairs, where the keys must be + # strings and the values may be (array of) string, boolean or numeric + # type. This argument should only be used when passing in a name. # @param [optional Time] timestamp Optional timestamp for the event. # This argument should only be used when passing in a name. # # @return [self] returns itself def add_event(name: nil, attributes: nil, timestamp: nil) self end + + # Record an error during the execution of this span. Multiple errors + # can be recorded on a span. + # + # @param [Exception] error The error to recorded + # + # @return [void] + def record_error(error); end # Sets the Status to the Span # # If used, this will override the default Span status. Default is OK. #