Skip to content

Commit 4f9ed3d

Browse files
committed
update yard docs
1 parent 0089f34 commit 4f9ed3d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

processor/baggage/lib/opentelemetry/processor/baggage/baggage_span_processor.rb

+15-10
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ module Baggage
1717
# via propagation headers. If the external services also have a Baggage span
1818
# processor, the keys and values will appear in those child spans as well.
1919
#
20-
# ⚠ ⚠ ⚠
20+
# ⚠️
2121
# To repeat: a consequence of adding data to Baggage is that the keys and
2222
# values will appear in all outgoing HTTP headers from the application.
2323
# Do not put sensitive information in Baggage.
24-
# ⚠ ⚠ ⚠
24+
# ⚠️
2525
#
2626
# @example
2727
# OpenTelemetry::SDK.configure do |c|
@@ -41,33 +41,38 @@ module Baggage
4141
# )
4242
# end
4343
class BaggageSpanProcessor
44-
# Called when a {Span} is started, adds Baggage keys/values to the span as attributes.
44+
# Called when a `Span` is started, adds Baggage keys/values to the span as attributes.
4545
#
46-
# @param [Span] span the {Span} that just started, expected to conform
47-
# to the concrete {Span} interface from the SDK and respond to :add_attributes.
48-
# @param [Context] parent_context the parent {Context} of the newly
46+
# @param [Span] span the `Span` that just started, expected to conform
47+
# to the concrete `Span` interface from the SDK and respond to :add_attributes.
48+
# @param [Context] parent_context the parent `Context` of the newly
4949
# started span.
5050
def on_start(span, parent_context)
5151
return unless span.respond_to?(:add_attributes) && parent_context.is_a?(::OpenTelemetry::Context)
5252

5353
span.add_attributes(::OpenTelemetry::Baggage.values(context: parent_context))
5454
end
5555

56+
# Called when a Span is ended, does nothing.
57+
#
5658
# NO-OP method to satisfy the SpanProcessor duck type.
5759
#
58-
# @param [Span] span the {Span} that just ended.
60+
# @param [Span] span the {OpenTelemetry::Trace::Span} that just ended.
5961
def on_finish(span); end
6062

61-
# Export all ended spans to the configured `Exporter` that have not yet
62-
# been exported.
63+
# Always successful; this processor does not maintain any state to flush.
64+
#
65+
# NO-OP method to satisfy the `SpanProcessor` duck type.
6366
#
6467
# @param [optional Numeric] timeout An optional timeout in seconds.
6568
# @return [Integer] 0 for success and there is nothing to flush so always successful.
6669
def force_flush(timeout: nil)
6770
0
6871
end
6972

70-
# Called when {TracerProvider#shutdown} is called.
73+
# Always successful; this processor does not maintain any state to clean up or processes to close on shutdown.
74+
#
75+
# NO-OP method to satisfy the `SpanProcessor` duck type.
7176
#
7277
# @param [optional Numeric] timeout An optional timeout in seconds.
7378
# @return [Integer] 0 for success and there is nothing to stop so always successful.

0 commit comments

Comments
 (0)