tracings

package
v1.2.80 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func With

func With(ctx context.Context, trace *Tracer)

Types

type Config

type Config struct {
	Enable      bool            `json:"enable"`
	BatchSize   int             `json:"batchSize"`
	ChannelSize int             `json:"channelSize"`
	Reporter    json.RawMessage `json:"reporter"`
}

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

func (*Middleware) Close

func (middle *Middleware) Close()

func (*Middleware) Construct

func (middle *Middleware) Construct(options transports.MiddlewareOptions) (err error)

func (*Middleware) Handler

func (middle *Middleware) Handler(next transports.Handler) transports.Handler

func (*Middleware) Name

func (middle *Middleware) Name() string

type Reporter

type Reporter interface {
	Construct(options ReporterOptions) (err error)
	Report(ctx context.Context, trace *Trace)
}

type ReporterOptions

type ReporterOptions struct {
	Log    logs.Logger
	Config configures.Config
}

type Span

type Span struct {
	Id       string            `json:"id" avro:"id"`
	Endpoint string            `json:"endpoint" avro:"endpoint"`
	Fn       string            `json:"fn" avro:"fn"`
	Begin    time.Time         `json:"begin" avro:"begin"`
	Waited   time.Time         `json:"waited" avro:"waited"`
	End      time.Time         `json:"end" avro:"end"`
	Tags     map[string]string `json:"tags" avro:"tags"`
	Children []*Span           `json:"children" avro:"children"`
	// contains filtered or unexported fields
}

type Trace

type Trace struct {
	Id   string
	Span *Span
}

type Tracer added in v1.2.0

type Tracer struct {
	Id   string
	Span *Span
	// contains filtered or unexported fields
}

func Load

func Load(ctx context.Context) (trace *Tracer, found bool)

func New

func New(id []byte) *Tracer

func (*Tracer) Begin added in v1.2.0

func (trace *Tracer) Begin(pid []byte, endpoint []byte, fn []byte, tags ...string)

func (*Tracer) Finish added in v1.2.0

func (trace *Tracer) Finish(tags ...string)

func (*Tracer) Mount added in v1.2.0

func (trace *Tracer) Mount(child *Span)

func (*Tracer) Tagging added in v1.2.0

func (trace *Tracer) Tagging(tags ...string)

func (*Tracer) Trace added in v1.2.0

func (trace *Tracer) Trace() (v *Trace)

func (*Tracer) Waited added in v1.2.0

func (trace *Tracer) Waited(tags ...string)

Jump to

Keyboard shortcuts

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