lib/opentelemetry/trace/span.rb in opentelemetry-api-0.15.0 vs lib/opentelemetry/trace/span.rb in opentelemetry-api-0.16.0
- old
+ new
@@ -59,9 +59,26 @@
def set_attribute(key, value)
self
end
alias []= set_attribute
+ # Add attributes
+ #
+ # Note that the OpenTelemetry project
+ # {https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md
+ # documents} certain "standard attributes" that have prescribed semantic
+ # meanings.
+ #
+ # @param [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attributes
+ # Values must be non-nil and (array of) string, boolean or numeric type.
+ # Array values must not contain nil elements and all elements must be of
+ # the same basic type (string, numeric, boolean).
+ #
+ # @return [self] returns itself
+ def add_attributes(attributes)
+ self
+ end
+
# Add an event to a {Span}.
#
# Example:
#
# span.add_event('event', attributes: {'eager' => true})