tracetree

package
v1.6.65 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SPAN_TRACE_VERSION = 0x12
View Source
const TRACE_TREE_VERSION = 0x13
View Source
const TRACE_TREE_VERSION_0X12 = 0x12 // before 20240827

Variables

This section is empty.

Functions

func HashSearchIndex

func HashSearchIndex(key string) uint64

func ReleaseSpanTrace

func ReleaseSpanTrace(t *SpanTrace)

func ReleaseTraceTree

func ReleaseTraceTree(t *TraceTree)

func TraceTreeColumns

func TraceTreeColumns() []*ckdb.Column

Types

type NodeInfo

type NodeInfo struct {
	AutoServiceType uint8
	AutoServiceID   uint32
	AppService      string

	IsIPv4 bool
	IP4    uint32
	IP6    net.IP
}

type SpanInfo

type SpanInfo struct {
	AutoServiceType0 uint8
	AutoServiceType1 uint8
	AutoServiceID0   uint32
	AutoServiceID1   uint32
	AppService0      string
	AppService1      string

	IsIPv4 bool
	IP40   uint32
	IP60   net.IP
	IP41   uint32
	IP61   net.IP
}

type SpanTrace

type SpanTrace struct {
	Time uint32 // not store, easy to use when calculating

	EndTimeUsPart uint32 // The microsecond part less than 1 second

	AutoServiceType0 uint8
	AutoServiceType1 uint8
	AutoServiceID0   uint32
	AutoServiceID1   uint32
	IsIPv4           bool
	IP40             uint32
	IP60             net.IP
	IP41             uint32
	IP61             net.IP

	ProcessId0             uint32
	ProcessId1             uint32
	AgentId                uint16
	ObservationPoint       string
	ReqTcpSeq              uint32
	RespTcpSeq             uint32
	XRequestId0            string
	XRequestId1            string
	SpanId                 string
	ParentSpanId           string
	AppService             string
	Topic                  string // only valid when is Kafka protocol, from l7FlowLog RequestDomain
	RequestType            string // only valid when is Kafka protocol
	SyscallTraceIDRequest  uint64
	SyscallTraceIDResponse uint64

	ResponseDuration uint64
	ResponseStatus   uint8
}

func AcquireSpanTrace

func AcquireSpanTrace() *SpanTrace

func (*SpanTrace) Decode

func (t *SpanTrace) Decode(decoder *codec.SimpleDecoder) error

type TraceTree

type TraceTree struct {
	Time        uint32
	SearchIndex uint64
	OrgId       uint16

	TraceId   string
	TreeNodes []TreeNode
	// contains filtered or unexported fields
}

func AcquireTraceTree

func AcquireTraceTree() *TraceTree

func (*TraceTree) Decode

func (t *TraceTree) Decode(decoder *codec.SimpleDecoder) error

func (*TraceTree) Encode

func (t *TraceTree) Encode()

func (*TraceTree) OrgID

func (t *TraceTree) OrgID() uint16

func (*TraceTree) Release

func (t *TraceTree) Release()

func (*TraceTree) WriteBlock

func (t *TraceTree) WriteBlock(block *ckdb.Block)

type TreeNode

type TreeNode struct {
	UniqParentSpanInfos []SpanInfo
	ParentNodeIndex     int32

	NodeInfo NodeInfo

	ChildIndices []int32 // helps with calculations, no need to write to Clickhouse
	PseudoLink   uint8
	Level        uint8  // helps with calculations, no need to write to Clickhouse
	UID          string // helps with calculations, no need to write to Clickhouse

	Topic string

	ResponseDurationSum            uint64
	ResponseTotal                  uint32
	ResponseStatusServerErrorCount uint32
}

Jump to

Keyboard shortcuts

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