From 1159ec04aa62168c6a841273401b71c325fa5986 Mon Sep 17 00:00:00 2001 From: "Kayla Reopelle (she/her)" <87386821+kaylareopelle@users.noreply.github.com> Date: Tue, 27 Jun 2023 06:42:31 -0700 Subject: [PATCH] docs: Describe Tracer#in_span arguments (#1474) These descriptions are based on the comments in the OpenTelemetry::SDK::Trace::SpanData struct --- api/lib/opentelemetry/trace/tracer.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/lib/opentelemetry/trace/tracer.rb b/api/lib/opentelemetry/trace/tracer.rb index bc57a381a9..edac704738 100644 --- a/api/lib/opentelemetry/trace/tracer.rb +++ b/api/lib/opentelemetry/trace/tracer.rb @@ -21,6 +21,14 @@ class Tracer # 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. + # + # @param name [String] the name of the span + # @param attributes [optional Hash] attributes to attach to the span {String => String, + # Numeric, Boolean, Array} + # @param links [optional Array] an array of OpenTelemetry::Trace::Link instances + # @param start_timestamp [optional Integer] nanoseconds since Epoch + # @param kind [optional Symbol] One of :internal, :server, :client, :producer, :consumer + # # @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, &block)