tracings

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service(reporter Reporter) (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