Class: Copilot::TraceContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Trace context for distributed tracing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#traceparentObject

Returns the value of attribute traceparent

Returns:

  • (Object)

    the current value of traceparent



487
488
489
# File 'lib/copilot/types.rb', line 487

def traceparent
  @traceparent
end

#tracestateObject

Returns the value of attribute tracestate

Returns:

  • (Object)

    the current value of tracestate



487
488
489
# File 'lib/copilot/types.rb', line 487

def tracestate
  @tracestate
end

Instance Method Details

#to_hObject



488
489
490
491
492
493
# File 'lib/copilot/types.rb', line 488

def to_h
  h = {}
  h[:traceparent] = traceparent if traceparent
  h[:tracestate] = tracestate if tracestate
  h
end