diagnostics

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewContext

func GetNewContext(ctx context.Context, span api.Span) context.Context

func NewSpan

func NewSpan(ctx context.Context, startTime time.Time, config map[string]interface{}) api.Span

NewSpan constructs a span and tag it with span/trace/parentSpan IDs. These IDs are generated using the Generator

func NewTracer

func NewTracer(config map[string]interface{}) (api.Tracer, error)

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 (o *OpenGenerator) GenerateNewContext(ctx context.Context, span api.Span) context.Context

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) GetSpanId

func (o *OpenGenerator) GetSpanId(ctx context.Context) string

func (*OpenGenerator) GetTraceId

func (o *OpenGenerator) GetTraceId(ctx context.Context) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL