diff --git a/api/lib/opentelemetry/context.rb b/api/lib/opentelemetry/context.rb index 722a157c6a..863d2c06ab 100644 --- a/api/lib/opentelemetry/context.rb +++ b/api/lib/opentelemetry/context.rb @@ -79,7 +79,6 @@ def with_current(ctx) # @param [String] key The lookup key # @param [Object] value The object stored under key - # @param [Callable] Block to execute in a new context # @yield [context, value] Yields the newly created context and value to # the block def with_value(key, value) @@ -93,10 +92,8 @@ def with_value(key, value) # Execute a block in a new context where its values are merged with the # incoming values. Restores the previous context after the block executes. - # @param [String] key The lookup key # @param [Hash] values Will be merged with values of the current context # and returned in a new context - # @param [Callable] Block to execute in a new context # @yield [context, values] Yields the newly created context and values # to the block def with_values(values) @@ -119,6 +116,9 @@ def clear Fiber.current.opentelemetry_context = [] end + # Returns an empty context. + # + # @return [Context] def empty new(EMPTY_ENTRIES) end @@ -160,7 +160,6 @@ def set_value(key, value) # # @param [Hash] values The values to be merged with the current context's # entries. - # @param [Object] value Object to be stored under key # @return [Context] def set_values(values) # rubocop:disable Naming/AccessorMethodName Context.new(@entries.merge(values)) diff --git a/api/lib/opentelemetry/trace.rb b/api/lib/opentelemetry/trace.rb index 34cfc31cd6..91a07600cc 100644 --- a/api/lib/opentelemetry/trace.rb +++ b/api/lib/opentelemetry/trace.rb @@ -53,8 +53,9 @@ def current_span(context = nil) # Returns a context containing the span, derived from the optional parent # context, or the current context if one was not provided. # - # @param [optional Context] context The context to use as the parent for - # the returned context + # @param [Span] span The span to store in the returned context. + # @param [Context] parent_context The optional context to use as the parent + # for the returned context. def context_with_span(span, parent_context: Context.current) parent_context.set_value(CURRENT_SPAN_KEY, span) end diff --git a/api/lib/opentelemetry/trace/span.rb b/api/lib/opentelemetry/trace/span.rb index 1d0b0b4ff5..2389657dde 100644 --- a/api/lib/opentelemetry/trace/span.rb +++ b/api/lib/opentelemetry/trace/span.rb @@ -93,7 +93,7 @@ def add_attributes(attributes) # documents} certain "standard attributes" that have prescribed semantic # meanings. # - # @param [OpenTelemetry::Trace::Link] the link object to add on the {Span}. + # @param [OpenTelemetry::Trace::Link] link The link object to add on the {Span}. # # @return [self] returns itself def add_link(link)