Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
NewContext return a copy of the parent context and associates it with a trace.
Types ¶
type Trace ¶
type Trace struct { ID string `json:"id"` SpanID string `json:"span_id"` ParentID string `json:"parent_id"` Sampled bool `json:"sampled"` }
Trace is server and client called trace info.
func FromContext ¶
FromContext returns the trace bound to the context, if any.
func InheritTrace ¶
InheritTrace fork a child trace from current trace.
func (*Trace) ClientReceive ¶
func (t *Trace) ClientReceive()
ClientReceive record the trace with a event ClientReceive and called it when the call end.
func (*Trace) ClientStart ¶
ClientStart record the trace with a event ClientStart and called it when the call start.
func (*Trace) Log ¶
Log record the trace with a event UserDefine and called it when you want more info.
func (*Trace) ServerReceive ¶
ServerReceive record the trace with a event ServerReceive and called it when the call end.
func (*Trace) ServerSend ¶
func (t *Trace) ServerSend()
ServerSend record the trace with a event ServerSend and called it when the call start.