Skip to content

Commit 1159ec0

Browse files
docs: Describe Tracer#in_span arguments (#1474)
These descriptions are based on the comments in the OpenTelemetry::SDK::Trace::SpanData struct
1 parent 848c512 commit 1159ec0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

api/lib/opentelemetry/trace/tracer.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ class Tracer
2121
# On exit, the Span that was active before calling this method will be reactivated. If an
2222
# exception occurs during the execution of the provided block, it will be recorded on the
2323
# span and reraised.
24+
#
25+
# @param name [String] the name of the span
26+
# @param attributes [optional Hash] attributes to attach to the span {String => String,
27+
# Numeric, Boolean, Array<String, Numeric, Boolean>}
28+
# @param links [optional Array] an array of OpenTelemetry::Trace::Link instances
29+
# @param start_timestamp [optional Integer] nanoseconds since Epoch
30+
# @param kind [optional Symbol] One of :internal, :server, :client, :producer, :consumer
31+
#
2432
# @yield [span, context] yields the newly created span and a context containing the
2533
# span to the block.
2634
def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil, &block)

0 commit comments

Comments
 (0)