tracings

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Endpoint string                 `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Fn       string                 `protobuf:"bytes,3,opt,name=fn,proto3" json:"fn,omitempty"`
	Begin    *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=begin,proto3" json:"begin,omitempty"`
	Waited   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=waited,proto3" json:"waited,omitempty"`
	End      *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"`
	Tags     map[string]string      `` /* 149-byte string literal not displayed */
	Children []*Span                `protobuf:"bytes,8,rep,name=children,proto3" json:"children,omitempty"`
	Parent   *Span                  `protobuf:"bytes,9,opt,name=parent,proto3" json:"parent,omitempty"`
	// contains filtered or unexported fields
}

func (*Span) Descriptor deprecated added in v1.2.0

func (*Span) Descriptor() ([]byte, []int)

Deprecated: Use Span.ProtoReflect.Descriptor instead.

func (*Span) GetBegin added in v1.2.0

func (x *Span) GetBegin() *timestamppb.Timestamp

func (*Span) GetChildren added in v1.2.0

func (x *Span) GetChildren() []*Span

func (*Span) GetEnd added in v1.2.0

func (x *Span) GetEnd() *timestamppb.Timestamp

func (*Span) GetEndpoint added in v1.2.0

func (x *Span) GetEndpoint() string

func (*Span) GetFn added in v1.2.0

func (x *Span) GetFn() string

func (*Span) GetId added in v1.2.0

func (x *Span) GetId() string

func (*Span) GetParent added in v1.2.0

func (x *Span) GetParent() *Span

func (*Span) GetTags added in v1.2.0

func (x *Span) GetTags() map[string]string

func (*Span) GetWaited added in v1.2.0

func (x *Span) GetWaited() *timestamppb.Timestamp

func (*Span) ProtoMessage added in v1.2.0

func (*Span) ProtoMessage()

func (*Span) ProtoReflect added in v1.2.0

func (x *Span) ProtoReflect() protoreflect.Message

func (*Span) Reset added in v1.2.0

func (x *Span) Reset()

func (*Span) String added in v1.2.0

func (x *Span) String() string

type Trace

type Trace struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Span *Span  `protobuf:"bytes,2,opt,name=span,proto3" json:"span,omitempty"`
	// contains filtered or unexported fields
}

func (*Trace) Descriptor deprecated added in v1.2.0

func (*Trace) Descriptor() ([]byte, []int)

Deprecated: Use Trace.ProtoReflect.Descriptor instead.

func (*Trace) GetId added in v1.2.0

func (x *Trace) GetId() string

func (*Trace) GetSpan added in v1.2.0

func (x *Trace) GetSpan() *Span

func (*Trace) ProtoMessage added in v1.2.0

func (*Trace) ProtoMessage()

func (*Trace) ProtoReflect added in v1.2.0

func (x *Trace) ProtoReflect() protoreflect.Message

func (*Trace) Reset added in v1.2.0

func (x *Trace) Reset()

func (*Trace) String added in v1.2.0

func (x *Trace) String() string

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