Documentation ¶
Index ¶
- Constants
- func DelZipkin(logid string)
- func ZipkinInit(name string)
- type OpenTracing
- func (ot *OpenTracing) Dump()
- func (ot *OpenTracing) EndChildSpan(index int)
- func (ot *OpenTracing) EndChildSpanByDuration(index int, duration int64)
- func (ot *OpenTracing) FromContextSetName(strContext, name string)
- func (ot *OpenTracing) GetChildSpanContext(index int) (string, error)
- func (ot *OpenTracing) SetChildTag(index int, k, v string)
- func (ot *OpenTracing) SetServerName(name string)
- func (ot *OpenTracing) SetTag(k, v string)
- func (ot *OpenTracing) StartChildSpan(name string) (int, error)
- type Span
- func (s *Span) Finish()
- func (s *Span) FinishByDuration(duration int64)
- func (s *Span) GetContextStr() string
- func (s *Span) GetDuration() int64
- func (s *Span) GetSampled() uint8
- func (s *Span) GetSpanId() string
- func (s *Span) SetSampled(sampled uint8)
- func (s *Span) SetSpanName(name string)
- func (s *Span) SetTag(k, v string)
- type Zipkin
- func (z *Zipkin) Clear()
- func (z *Zipkin) Dump() ([]map[string]interface{}, error)
- func (z *Zipkin) EndChildSpan(index int) error
- func (z *Zipkin) EndChildSpanByDuration(index int, duration int64) error
- func (z *Zipkin) GetChildSpanContextString(index int) (string, error)
- func (z *Zipkin) SetChildTag(k, v string, index int) error
- func (z *Zipkin) SetFromContext(context string)
- func (z *Zipkin) SetName(name string)
- func (z *Zipkin) SetServerName(name string)
- func (z *Zipkin) SetTag(k, v string) error
- func (z *Zipkin) StartChildSpan(name string) (int, error)
Constants ¶
View Source
const ( TraceIdKeyName = "x-b3-traceid" SpanIdKeyName = "x-b3-spanid" ParentSpanIdKeyName = "x-b3-parentspanid" SampledKeyName = "x-b3-sampled" FlagsKeyName = "x-b3-flags" )
View Source
const (
TraceHeader = "Opentracer-Info"
)
Variables ¶
This section is empty.
Functions ¶
func ZipkinInit ¶
func ZipkinInit(name string)
Types ¶
type OpenTracing ¶
type OpenTracing struct {
ServerName string
}
func GetOpenTracing ¶
func GetOpenTracing() *OpenTracing
func NewOpenTracing ¶
func NewOpenTracing(name string) *OpenTracing
func (*OpenTracing) Dump ¶
func (ot *OpenTracing) Dump()
func (*OpenTracing) EndChildSpan ¶
func (ot *OpenTracing) EndChildSpan(index int)
func (*OpenTracing) EndChildSpanByDuration ¶
func (ot *OpenTracing) EndChildSpanByDuration(index int, duration int64)
func (*OpenTracing) FromContextSetName ¶
func (ot *OpenTracing) FromContextSetName(strContext, name string)
func (*OpenTracing) GetChildSpanContext ¶
func (ot *OpenTracing) GetChildSpanContext(index int) (string, error)
func (*OpenTracing) SetChildTag ¶
func (ot *OpenTracing) SetChildTag(index int, k, v string)
func (*OpenTracing) SetServerName ¶
func (ot *OpenTracing) SetServerName(name string)
func (*OpenTracing) SetTag ¶
func (ot *OpenTracing) SetTag(k, v string)
func (*OpenTracing) StartChildSpan ¶
func (ot *OpenTracing) StartChildSpan(name string) (int, error)
返回Child Span的index,错误时index为小于0
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
func (*Span) FinishByDuration ¶
func (*Span) GetContextStr ¶
func (*Span) GetDuration ¶
func (*Span) GetSampled ¶
func (*Span) SetSampled ¶
func (*Span) SetSpanName ¶
type Zipkin ¶
type Zipkin struct {
// contains filtered or unexported fields
}
func (*Zipkin) EndChildSpan ¶
func (*Zipkin) EndChildSpanByDuration ¶
func (*Zipkin) GetChildSpanContextString ¶
func (*Zipkin) SetFromContext ¶
func (*Zipkin) SetServerName ¶
Click to show internal directories.
Click to hide internal directories.