Method: Jaeger::Span#initialize

Defined in:
lib/jaeger/span.rb

#initialize(context, operation_name, reporter, start_time: Time.now, references: [], tags: {}) ⇒ Span

Creates a new Jaeger::Span

Parameters:

  • context (SpanContext)

    the context of the span

  • operation_name (String)

    the operation name

  • reporter (#report)

    span reporter



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/jaeger/span.rb', line 18

def initialize(context, operation_name, reporter, start_time: Time.now, references: [], tags: {})
  @context = context
  @operation_name = operation_name
  @reporter = reporter
  @start_time = start_time
  @references = references
  @tags = []
  @logs = []

  tags.each { |key, value| set_tag(key, value) }
end