tracings

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReporterComponent added in v0.14.0

func NewReporterComponent(reporter Reporter) (component service.Component)

func Service

func Service(components ...service.Component) (v service.Service)

Types

type Reporter

type Reporter interface {
	Build(options ReporterOptions) (err error)
	Report(ctx context.Context, tracer *Tracer) (err error)
	Close()
}

type ReporterOptions

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

type Span

type Span struct {
	Id         string            `json:"id" validate:"not_blank" message:"id is blank"`
	Service    string            `json:"service" validate:"not_blank" message:"service is blank"`
	Fn         string            `json:"fn" validate:"not_blank" message:"fn is blank"`
	TracerId   string            `json:"tracerId" validate:"not_blank" message:"tracerId is blank"`
	StartAT    time.Time         `json:"startAt" validate:"required" message:"startAt is invalid"`
	FinishedAT time.Time         `json:"finishedAt" validate:"required" message:"finishedAt is invalid"`
	Parent     *Span             `json:"parent"`
	Children   []*Span           `json:"children"`
	Tags       map[string]string `json:"tags"`
}

type Tracer

type Tracer struct {
	Id   string `json:"id" validate:"not_blank" message:"id is blank"`
	Span *Span  `json:"span" validate:"required" message:"span is required"`
}

func (*Tracer) FlatSpans

func (tracer *Tracer) FlatSpans() (spans []*Span)

Jump to

Keyboard shortcuts

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