tracecache

package module
v0.0.0-...-c80cab7 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTrace

func BuildTrace(trace *OtelTrace) ptrace.Traces

func BuildTraces

func BuildTraces(traces []*OtelTrace) ptrace.Traces

Types

type Connector

type Connector interface {
	Name() string
}

type OtelTrace

type OtelTrace struct {
	Resource *pcommon.Resource
	Spans    []*ptrace.Span
}

func NewOtelTrace

func NewOtelTrace(resource *pcommon.Resource, spans []*ptrace.Span) *OtelTrace

type Sampler

type Sampler interface {
	Name() string
	GetSampleTime() int

	Sample(id pcommon.TraceID, trace *OtelTrace)
	BatchSample(id pcommon.TraceID, traces []*OtelTrace)
}

type SpanMapping

type SpanMapping interface {
	GetEntrySpanName(spanId pcommon.SpanID) string
}

type TraceCache

type TraceCache interface {
	IsEnable() bool

	CacheTrace(traces ptrace.Traces) map[pcommon.TraceID]SpanMapping

	// 设置采样器
	SetSampler(sampler Sampler) error

	SetConnector(connector Connector)

	HasConnector() bool
}

Jump to

Keyboard shortcuts

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