Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TraceCarrier ¶
type TraceCarrier struct { TraceID trace.TraceID `json:"traceID"` SpanID trace.SpanID `json:"spanID"` Remote bool `json:"remote"` }
TraceCarrier is a wrapper that allows trace.SpanContext's to be round-tripped through JSON.
func NewTraceCarrier ¶
func NewTraceCarrier(sc trace.SpanContext) *TraceCarrier
NewTraceCarrier accepts a trace.SpanContext and returns a TraceCarrier.
func (*TraceCarrier) AsSpanContext ¶
func (c *TraceCarrier) AsSpanContext() trace.SpanContext
AsSpanContext converts TraceCarrier to a trace.SpanContext.
func (*TraceCarrier) MarshalJSON ¶
func (c *TraceCarrier) MarshalJSON() ([]byte, error)
MarshalJSON converts TraceCarrier to a trace.SpanContext and marshals it to JSON.
func (*TraceCarrier) UnmarshalJSON ¶
func (c *TraceCarrier) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshalls a serialized trace.SpanContext to a TraceCarrier.
Click to show internal directories.
Click to hide internal directories.