Documentation ¶
Index ¶
- Constants
- Variables
- func StartClientSpan(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)
- func StartServerSpan(ctx context.Context, carrier Carrier, serviceName, operationName string) (context.Context, tracespec.Trace)
- type Carrier
- type Propagator
- type Span
- func (s *Span) Finish()
- func (s *Span) Follow(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)
- func (s *Span) Fork(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)
- func (s *Span) SpanId() string
- func (s *Span) TraceId() string
- func (s *Span) Visit(fn func(key, val string) bool)
Constants ¶
View Source
const ( // HttpFormat means http carrier format. HttpFormat = iota // GrpcFormat means grpc carrier format. GrpcFormat )
Variables ¶
View Source
var ErrInvalidCarrier = errors.New("invalid carrier")
ErrInvalidCarrier indicates an error that the carrier is invalid.
Functions ¶
Types ¶
type Carrier ¶
Carrier interface wraps the Get and Set method.
type Propagator ¶
type Propagator interface { Extract(carrier interface{}) (Carrier, error) Inject(carrier interface{}) (Carrier, error) }
Propagator interface wraps the Extract and Inject methods.
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
A Span is a calling span that connects caller and callee.
func (*Span) Follow ¶
func (s *Span) Follow(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)
Follow follows the tracing service and operation names in context.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.