Documentation ¶
Index ¶
- func GetNewContext(ctx context.Context, span api.Span) context.Context
- func NewSpan(ctx context.Context, startTime time.Time, config map[string]interface{}) api.Span
- func NewTracer(config map[string]interface{}) (api.Tracer, error)
- func StreamInterceptorFilter(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func UnaryInterceptorFilter(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- type OpenGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSpan ¶
NewSpan constructs a span and tag it with span/trace/parentSpan IDs. These IDs are generated using the Generator
func StreamInterceptorFilter ¶
func StreamInterceptorFilter(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func UnaryInterceptorFilter ¶
func UnaryInterceptorFilter(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
UnaryInterceptorFilter is an implementation of grpc.UnaryServerInterceptor
Types ¶
type OpenGenerator ¶
type OpenGenerator struct { }
OpenGenerator is the default implementation of Generator
func (*OpenGenerator) GenerateNewContext ¶
func (*OpenGenerator) GetParentSpanId ¶
func (o *OpenGenerator) GetParentSpanId(ctx context.Context) string
GetParentSpanId returns the same id as GetSpanId. It's because currently Layotto don't know the parent id.
func (*OpenGenerator) GetTraceId ¶
func (o *OpenGenerator) GetTraceId(ctx context.Context) string
Click to show internal directories.
Click to hide internal directories.