tracing

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL