diff --git a/hearth/lib/hearth/telemetry/base.rb b/hearth/lib/hearth/telemetry/base.rb index 48a781fd8..4e5f9b5a3 100644 --- a/hearth/lib/hearth/telemetry/base.rb +++ b/hearth/lib/hearth/telemetry/base.rb @@ -30,7 +30,7 @@ def initialize(tracer_provider: nil, context_manager: nil) class TracerProviderBase # Returns a Tracer instance. # - # @param [optional String] name Tracer name + # @param [String] name Tracer name # @return [Tracer] def tracer(name = nil) raise NotImplementedError @@ -43,9 +43,9 @@ class TracerBase # lifecycle of the Span and its parent manually. # # @param [String] name Span name - # @param [optional object] with_parent Parent Context - # @param [optional Hash] attributes Attributes to attach to the span - # @param [optional Hearth::Telemetry::SpanKind] kind Type of Span + # @param [Object] with_parent Parent Context + # @param [Hash] attributes Attributes to attach to the span + # @param [Hearth::Telemetry::SpanKind] kind Type of Span # @return [Span] def start_span(name, with_parent: nil, attributes: nil, kind: nil) raise NotImplementedError @@ -58,8 +58,8 @@ def start_span(name, with_parent: nil, attributes: nil, kind: nil) # provided block, it will be recorded on the span and re-raised. # # @param [String] name Span name - # @param [optional Hash] attributes Attributes to attach to the span - # @param [optional Hearth::Telemetry::SpanKind] kind Type of Span + # @param [Hash] attributes Attributes to attach to the span + # @param [Hearth::Telemetry::SpanKind] kind Type of Span # @return [Span] def in_span(name, attributes: nil, kind: nil) raise NotImplementedError @@ -96,7 +96,7 @@ def add_attributes(attributes) # Add event to a Span. # # @param [String] name Name of the event. - # @param [optional Hash{String => String, Numeric, Boolean, Array String, Numeric, Boolean, Array}] 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, @@ -117,7 +117,7 @@ def status=(status) # Finishes the Span. # - # @param [optional Time] end_timestamp End timestamp for the span. + # @param [Time] end_timestamp End timestamp for the span. # @return [self] returns itself def finish(end_timestamp: nil) raise NotImplementedError @@ -127,7 +127,7 @@ def finish(end_timestamp: nil) # exceptions can be recorded on a span. # # @param [Exception] exception The exception to be recorded - # @param [optional Hash{String => String, Numeric, Boolean, Array String, Numeric, Boolean, Array}] 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. diff --git a/hearth/lib/hearth/telemetry/otel.rb b/hearth/lib/hearth/telemetry/otel.rb index b0b197dbd..f2b4078f9 100644 --- a/hearth/lib/hearth/telemetry/otel.rb +++ b/hearth/lib/hearth/telemetry/otel.rb @@ -74,9 +74,9 @@ def initialize(tracer) # lifecycle of the Span and its parent manually. # # @param [String] name Span name - # @param [optional object] with_parent Parent Context - # @param [optional Hash] attributes Attributes to attach to the span - # @param [optional Hearth::Telemetry::SpanKind] kind Type of Span + # @param [Object] with_parent Parent Context + # @param [Hash] attributes Attributes to attach to the span + # @param [Hearth::Telemetry::SpanKind] kind Type of Span # @return [Span] def start_span(name, with_parent: nil, attributes: nil, kind: nil) span = @tracer.start_span( @@ -95,8 +95,8 @@ def start_span(name, with_parent: nil, attributes: nil, kind: nil) # provided block, it will be recorded on the span and re-raised. # # @param [String] name Span name - # @param [optional Hash] attributes Attributes to attach to the span - # @param [optional Hearth::Telemetry::SpanKind] kind Type of Span + # @param [Hash] attributes Attributes to attach to the span + # @param [Hearth::Telemetry::SpanKind] kind Type of Span # @return [Span] def in_span(name, attributes: nil, kind: nil, &block) @tracer.in_span(name, attributes: attributes, kind: kind) do |span| @@ -141,7 +141,7 @@ def add_attributes(attributes) # Add event to a Span. # # @param [String] name Name of the event. - # @param [optional Hash{String => String, Numeric, Boolean, Array String, Numeric, Boolean, Array}] 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, @@ -162,7 +162,7 @@ def status=(status) # Finishes the Span. # - # @param [optional Time] end_timestamp End timestamp for the span. + # @param [Time] end_timestamp End timestamp for the span. # @return [self] returns itself def finish(end_timestamp: nil) @span.finish(end_timestamp: end_timestamp) @@ -172,7 +172,7 @@ def finish(end_timestamp: nil) # exceptions can be recorded on a span. # # @param [Exception] exception The exception to be recorded - # @param [optional Hash{String => String, Numeric, Boolean, Array String, Numeric, Boolean, Array}] 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.