Documentation ¶
Index ¶
- func CheckCollectorDir(path string) error
- func ClearDir(dir string) error
- func CollectTraces(ctx context.Context, path string) chan interface{}
- func Log(data []byte, traceid, spanid string) error
- func NewTracedContext(ctx context.Context, span Spanner) context.Context
- func NewTracedGRPCContext(ctx context.Context, span Spanner) context.Context
- func NewTracedRequest(method, url string, body io.Reader, span Spanner) (*http.Request, error)
- func TracedRequest(r *http.Request, span Spanner) *http.Request
- func TracedResponse(w http.ResponseWriter, span Spanner) http.ResponseWriter
- type Collector
- type Deamon
- type KV
- type NatsCollector
- type Scanner
- type Span
- func (s Span) AddBaggage(kvs ...*KV)
- func (s *Span) AddLog(kvs ...*KV)
- func (s *Span) AddTag(kvs ...*KV)
- func (s *Span) Child(name string) *Span
- func (s *Span) EndTime()
- func (s *Span) Finish()
- func (s *Span) Marshall() ([]byte, error)
- func (span *Span) Serialize() *Values
- func (s *Span) StartTime()
- func (s *Span) String() string
- type SpanContext
- type Spanner
- func FromContext(ctx context.Context, name string) (Spanner, error)
- func FromCustomSource(ctx *sPb.SpanContext, tags map[string]string, name string) (Spanner, error)
- func FromGRPCContext(ctx context.Context, name string) (Spanner, error)
- func FromRequest(r *http.Request, name string) (Spanner, error)
- func FromResponse(w http.ResponseWriter, name string) (Spanner, error)
- type Trace
- type Tracer
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCollectorDir ¶
func CollectTraces ¶
func NewTracedGRPCContext ¶
func NewTracedRequest ¶
func TracedResponse ¶
func TracedResponse(w http.ResponseWriter, span Spanner) http.ResponseWriter
Types ¶
type NatsCollector ¶
type NatsCollector struct {
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector(address, topic string) (*NatsCollector, error)
func (NatsCollector) Collect ¶
func (n NatsCollector) Collect(data []*sPb.Span)
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
func InitSpan ¶
func InitSpan(c *SpanContext, name string) *Span
func (Span) AddBaggage ¶
type SpanContext ¶
type SpanContext struct {
// contains filtered or unexported fields
}
func NewSpanContext ¶
func NewSpanContext(tid, pid string) *SpanContext
func (*SpanContext) String ¶
func (s *SpanContext) String() string
type Spanner ¶
type Spanner interface { Child(name string) *Span AddLog(kvs ...*KV) AddTag(kvs ...*KV) AddBaggage(kvs ...*KV) StartTime() EndTime() Finish() // send data to collector and maybe serialize to ctx ot request Serialize() *Values Marshall() ([]byte, error) }
func FromCustomSource ¶
func FromResponse ¶
func FromResponse(w http.ResponseWriter, name string) (Spanner, error)
Click to show internal directories.
Click to hide internal directories.