model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDurationRank = "max_duration"
	MinDurationRank = "min_duration"
	AvgDurationRank = "avg_duration"
	ErrorsRank      = "errors"
)

RankType

View Source
const (
	RefTypeChildOf int8 = iota
	RefTypeFollowsFrom
)

RefType Kind

View Source
const (
	TagString int8 = iota
	TagInt
	TagBool
	TagFloat
)

TagKind

Variables

This section is empty.

Functions

func SortRank

func SortRank(values []MeanOperationNameValue)

SortRank Desc

func VerifyRankType

func VerifyRankType(rankType string) bool

VerifyRankType .

Types

type Field

type Field struct {
	Key   string
	Value []byte
}

Field log field

type Log

type Log struct {
	Timestamp int64
	Fields    []Field
}

Log span log

type MeanOperationNameValue

type MeanOperationNameValue struct {
	Tag   map[string]string
	Value float64
}

MeanOperationNameValue .

type SamplePoint

type SamplePoint struct {
	TraceID uint64
	SpanID  uint64
	Value   int64
}

SamplePoint SamplePoint

type Series

type Series struct {
	Timestamps []int64
	Items      []*SeriesItem
}

Series data

type SeriesItem

type SeriesItem struct {
	Field string
	Rows  []*float64
}

SeriesItem .

type Span

type Span struct {
	ServiceName   string
	OperationName string
	TraceID       uint64
	SpanID        uint64
	ParentID      uint64
	Env           string
	StartTime     time.Time
	Duration      time.Duration
	References    []SpanRef
	Tags          map[string]interface{}
	Logs          []Log
}

Span represents a named unit of work performed by a service.

func FromProtoSpan

func FromProtoSpan(data []byte) (*Span, error)

FromProtoSpan convert protogen.Span to model.Span

func (*Span) IsError

func (s *Span) IsError() bool

IsError is error happend

func (*Span) IsServer

func (s *Span) IsServer() bool

IsServer span kind is server

func (*Span) ParentIDStr

func (s *Span) ParentIDStr() string

ParentIDStr return hex format parent_id

func (*Span) SpanIDStr

func (s *Span) SpanIDStr() string

SpanIDStr return hex format span_id

func (*Span) StringTag

func (s *Span) StringTag(key string) string

StringTag get string value from tag

func (*Span) TraceIDStr

func (s *Span) TraceIDStr() string

TraceIDStr return hex format trace_id

type SpanListRef

type SpanListRef struct {
	TraceID  uint64
	SpanID   uint64
	IsError  bool
	Duration int64
}

SpanListRef .

func (SpanListRef) SpanIDStr

func (s SpanListRef) SpanIDStr() string

SpanIDStr hex format traceid

func (SpanListRef) TraceIDStr

func (s SpanListRef) TraceIDStr() string

TraceIDStr hex format traceid

type SpanPoint

type SpanPoint struct {
	Timestamp     int64
	ServiceName   string
	OperationName string
	PeerService   string
	SpanKind      string
	AvgDuration   SamplePoint // random sample point
	MaxDuration   SamplePoint
	MinDuration   SamplePoint
	Errors        []SamplePoint
}

SpanPoint contains time series

type SpanRef

type SpanRef struct {
	RefType int8
	TraceID uint64
	SpanID  uint64
}

SpanRef describes causal relationship of the current span to another span (e.g. 'child-of')

type Tag

type Tag struct {
	Kind  int8
	Key   string
	Value interface{}
}

Tag span tag

Jump to

Keyboard shortcuts

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