Documentation ¶
Index ¶
- func SubmitAll(ctx context.Context, spans []Span)
- func TraceToWriter(ctx context.Context, w io.Writer, fn func(context.Context) error) error
- func WithSpan(ctx context.Context, span *Span) context.Context
- func WithTracer(ctx context.Context, tr Tracer) context.Context
- type MemoryTracer
- type Propagation
- type Span
- type SpanBuilder
- type Tracer
- type WriterTracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TraceToWriter ¶
Types ¶
type MemoryTracer ¶
type MemoryTracer struct {
// contains filtered or unexported fields
}
func NewMemoryTracer ¶
func NewMemoryTracer(ctx context.Context) *MemoryTracer
func (*MemoryTracer) Close ¶
func (mt *MemoryTracer) Close() []Span
func (*MemoryTracer) Submit ¶
func (mt *MemoryTracer) Submit(span *Span)
type Propagation ¶
func PropagationFromContext ¶
func PropagationFromContext(ctx context.Context) *Propagation
type Span ¶
type Span struct { TraceId string `json:"trace_id"` SpanId string `json:"span_id"` ParentId string `json:"parent_id"` Name string `json:"name"` Start time.Time `json:"start"` Duration time.Duration `json:"duration"` Fields map[string]interface{} `json:"fields"` }
func CollectSpans ¶
type SpanBuilder ¶
type SpanBuilder struct {
// contains filtered or unexported fields
}
func StartPropagatedSpan ¶
func StartPropagatedSpan(ctx context.Context, name string, p *Propagation) (context.Context, *SpanBuilder)
func StartSpanInTrace ¶
func (*SpanBuilder) AddField ¶
func (sp *SpanBuilder) AddField(name string, v interface{})
func (*SpanBuilder) End ¶
func (sp *SpanBuilder) End() *Span
func (*SpanBuilder) Id ¶
func (sp *SpanBuilder) Id() string
func (*SpanBuilder) Propagation ¶
func (sp *SpanBuilder) Propagation() *Propagation
func (*SpanBuilder) TraceId ¶
func (sp *SpanBuilder) TraceId() string
func (*SpanBuilder) WillSubmit ¶
func (sp *SpanBuilder) WillSubmit() bool
type WriterTracer ¶
type WriterTracer struct {
// contains filtered or unexported fields
}
func WithWriterTracer ¶
func (*WriterTracer) Close ¶
func (wt *WriterTracer) Close() error
func (*WriterTracer) Submit ¶
func (wt *WriterTracer) Submit(span *Span)
Click to show internal directories.
Click to hide internal directories.