trace

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2026 License: Apache-2.0 Imports: 85 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package trace implements a trace-based storage which consists of trace data. Traces are composed of spans and support querying by trace ID and various tags. TODO: Remove this once trace partitioning is implemented nolint:unused

Index

Constants

View Source
const (
	// BenchmarkMergePhasePrimary is the benchmark's steady input phase.
	BenchmarkMergePhasePrimary BenchmarkMergePhase = mergePhasePrimary
	// BenchmarkMergePhaseDrain is the phase that drains outstanding merge work.
	BenchmarkMergePhaseDrain BenchmarkMergePhase = mergePhaseDrain
	// BenchmarkMergePhaseCooldown is the post-input observation phase.
	BenchmarkMergePhaseCooldown BenchmarkMergePhase = mergePhaseCooldown
	// BenchmarkMergeSamplingExecuted means at least one sampler evaluated traces.
	BenchmarkMergeSamplingExecuted BenchmarkMergeSampling = mergeSamplingExecuted
	// BenchmarkMergeSamplingEnabledNoEvaluation means sampling was enabled but no trace reached a sampler.
	BenchmarkMergeSamplingEnabledNoEvaluation BenchmarkMergeSampling = mergeSamplingEnabledNoEvaluation
	// BenchmarkMergeSamplingNotExecuted means sampling was ineligible for the merge.
	BenchmarkMergeSamplingNotExecuted BenchmarkMergeSampling = mergeSamplingNotExecuted
	// BenchmarkMergeStagingFlushEndOfMerge means the final complete-trace batch was flushed when input ended.
	BenchmarkMergeStagingFlushEndOfMerge BenchmarkMergeStagingFlushReason = mergeStagingFlushEndOfMerge
	// BenchmarkMergeStagingFlushByteLimit means the charged staging-byte limit triggered the flush.
	BenchmarkMergeStagingFlushByteLimit BenchmarkMergeStagingFlushReason = mergeStagingFlushByteLimit
	// BenchmarkMergeStagingFlushTraceLimit means the logical trace-count limit triggered the flush.
	BenchmarkMergeStagingFlushTraceLimit BenchmarkMergeStagingFlushReason = mergeStagingFlushTraceLimit
	// BenchmarkMergeStagingFlushByteAndTraceLimit means both staging limits were reached at the flush boundary.
	BenchmarkMergeStagingFlushByteAndTraceLimit BenchmarkMergeStagingFlushReason = mergeStagingFlushByteAndTraceLimit
	// BenchmarkMergeStagingFlushOversizedTrace means an oversized trace forced the preceding complete batch to flush.
	BenchmarkMergeStagingFlushOversizedTrace BenchmarkMergeStagingFlushReason = mergeStagingFlushOversizedTrace
	// BenchmarkMergeReasonPipelineDisabled means the native pipeline was disabled.
	BenchmarkMergeReasonPipelineDisabled BenchmarkMergeReason = mergeReasonPipelineDisabled
	// BenchmarkMergeReasonNoSampler means the group had no sampler.
	BenchmarkMergeReasonNoSampler BenchmarkMergeReason = mergeReasonNoSampler
	// BenchmarkMergeReasonEventDisabled means merge sampling was disabled by configuration.
	BenchmarkMergeReasonEventDisabled BenchmarkMergeReason = mergeReasonEventDisabled
	// BenchmarkMergeReasonGrace means the selected parts were inside merge grace.
	BenchmarkMergeReasonGrace BenchmarkMergeReason = mergeReasonGrace
	// BenchmarkMergeReasonGuardUnavailable means the fragment guard could not be created.
	BenchmarkMergeReasonGuardUnavailable BenchmarkMergeReason = mergeReasonGuardUnavailable
	// BenchmarkMergeReasonAllOversized means every trace bypassed evaluation due to its size.
	BenchmarkMergeReasonAllOversized BenchmarkMergeReason = mergeReasonAllOversized
	// BenchmarkMergeReasonLosslessRetry means guard revalidation forced a lossless retry.
	BenchmarkMergeReasonLosslessRetry BenchmarkMergeReason = mergeReasonLosslessRetry
	// BenchmarkMergeReasonEmptyInput means no input parts were supplied.
	BenchmarkMergeReasonEmptyInput BenchmarkMergeReason = mergeReasonEmptyInput
	// BenchmarkMergeReasonOther is the bounded fallback for an unclassified bypass.
	BenchmarkMergeReasonOther BenchmarkMergeReason = mergeReasonOther
)
View Source
const BenchmarkDefaultMergeGrace = defaultTracePipelineMergeGrace

BenchmarkDefaultMergeGrace is the production trace-pipeline merge-grace fallback used by benchmark workloads.

View Source
const PartTypeCore = queue.PartTypeCore

PartTypeCore is the type of the core part.

Variables

View Source
var ErrBenchmarkNoMergeSelection = errNoPartToMerge

ErrBenchmarkNoMergeSelection means the production policy has no eligible merge in the current snapshot.

View Source
var (

	// ErrTraceNotExist denotes a trace doesn't exist in the metadata repo.
	ErrTraceNotExist = errors.New("trace doesn't exist")
)
View Source
var (

	// ErrTraceNotFound is returned when a trace is not found.
	ErrTraceNotFound = errors.New("trace not found")
)

Functions

func CreatePartFileReaderFromPath added in v0.10.0

func CreatePartFileReaderFromPath(partPath string, lfs fs.FileSystem) ([]queue.FileInfo, func())

CreatePartFileReaderFromPath opens all files in a part directory and returns their FileInfo and a cleanup function.

func EncodePart added in v0.11.0

func EncodePart(root string, fileSystem fs.FileSystem, partID uint64, rows []PartEncoderRow) (string, func())

EncodePart converts rows through the same traces-to-mem-part encoder used by liaison writes and flushes one immutable part.

func GuardSnapshotTrace added in v0.12.0

func GuardSnapshotTrace(ctx context.Context, trace SnapshotTrace, sourceMin, sourceMax int64, grace time.Duration, proposedKeep bool) (bool, string)

GuardSnapshotTrace applies the existing fragment guard to a proposed snapshot drop. It inherits the storage runtime's grace and completeness semantics for the pinned inventory.

func ParsePartMetadata added in v0.10.0

func ParsePartMetadata(fileSystem fs.FileSystem, partPath string) (queue.StreamingPartData, error)

ParsePartMetadata parses the part metadata from the metadata.json file.

func VisitTracesInTimeRange added in v0.10.0

func VisitTracesInTimeRange(tsdbRootPath string, timeRange timestamp.TimeRange, visitor Visitor, intervalRule storage.IntervalRule) ([]string, error)

VisitTracesInTimeRange traverses trace parts within the specified time range and calls the visitor methods for parts and sidx directories. This function works directly with the filesystem without requiring a database instance. Returns a list of segment suffixes that were visited.

Types

type BenchmarkConsolidatedSizes added in v0.11.0

type BenchmarkConsolidatedSizes struct {
	Indexes map[string]uint64
	Core    uint64
}

BenchmarkConsolidatedSizes reports production-merged compressed sizes without changing the received fixture.

type BenchmarkMergeAggregate added in v0.11.0

type BenchmarkMergeAggregate = mergeBenchmarkAggregate

BenchmarkMergeAggregate groups merge measurements by phase, sampling state, reason, and lane.

type BenchmarkMergeChild added in v0.11.0

type BenchmarkMergeChild = mergeBenchmarkChild

BenchmarkMergeChild records a secondary-index merge linked to its core merge.

type BenchmarkMergeEvent added in v0.11.0

type BenchmarkMergeEvent = mergeBenchmarkEvent

BenchmarkMergeEvent records one core merge and its secondary-index children.

type BenchmarkMergeInventory added in v0.11.0

type BenchmarkMergeInventory struct {
	IndexRows  map[string]uint64 `json:"indexRows"`
	IndexBytes map[string]uint64 `json:"indexBytes"`
	IndexParts map[string]int    `json:"indexParts"`
	CoreRows   uint64            `json:"coreRows"`
	CoreBytes  uint64            `json:"coreBytes"`
	CoreParts  int               `json:"coreParts"`
}

BenchmarkMergeInventory summarizes durable core and secondary-index output.

type BenchmarkMergePhase added in v0.11.0

type BenchmarkMergePhase = mergeBenchmarkPhase

BenchmarkMergePhase identifies the benchmark phase in which a merge began.

type BenchmarkMergePluginBatch added in v0.11.0

type BenchmarkMergePluginBatch = mergeBenchmarkPluginBatch

BenchmarkMergePluginBatch aggregates one chain decision result.

type BenchmarkMergePluginExecution added in v0.11.0

type BenchmarkMergePluginExecution = mergeBenchmarkPluginExecution

BenchmarkMergePluginExecution aggregates one plugin/result pair.

type BenchmarkMergeReason added in v0.11.0

type BenchmarkMergeReason = mergeSamplingReason

BenchmarkMergeReason identifies a bounded reason sampling did not execute.

type BenchmarkMergeReceiverOptions added in v0.11.0

type BenchmarkMergeReceiverOptions struct {
	LogicalNow       time.Time
	EventWriter      io.Writer
	Sampler          sdk.Sampler
	SamplerName      string
	PartMergeDepths  map[uint64]uint32
	SegmentTimeRange timestamp.TimeRange
	IndexNames       []string
	MergeGrace       time.Duration
	MemoryLimit      uint64
	MaxInputPartID   uint64
	Attribution      bool
	BlockMerges      bool
}

BenchmarkMergeReceiverOptions configures a production merge benchmark receiver.

type BenchmarkMergeRecordingOptions added in v0.11.0

type BenchmarkMergeRecordingOptions struct {
	Writer      io.Writer
	Phase       BenchmarkMergePhase
	Attribution bool
}

BenchmarkMergeRecordingOptions controls benchmark-only merge recording.

type BenchmarkMergeReport added in v0.11.0

type BenchmarkMergeReport = mergeBenchmarkSnapshot

BenchmarkMergeReport contains completed merge events and grouped aggregates.

type BenchmarkMergeResources added in v0.11.0

type BenchmarkMergeResources = mergeBenchmarkResources

BenchmarkMergeResources records process resource deltas attributed to a merge.

type BenchmarkMergeSampling added in v0.11.0

type BenchmarkMergeSampling = mergeSamplingClassification

BenchmarkMergeSampling classifies whether sampling was executed for a merge.

type BenchmarkMergeStagingBatch added in v0.11.0

type BenchmarkMergeStagingBatch = mergeBenchmarkStagingBatch

BenchmarkMergeStagingBatch records one complete-trace staging flush.

type BenchmarkMergeStagingFlushReason added in v0.11.0

type BenchmarkMergeStagingFlushReason = mergeStagingFlushReason

BenchmarkMergeStagingFlushReason identifies why a complete-trace staging batch was flushed.

type BenchmarkMergeStagingLimits added in v0.11.0

type BenchmarkMergeStagingLimits struct {
	MemoryLimit   uint64 `json:"memoryLimit"`
	StageBytes    uint64 `json:"stageBytes"`
	TraceBytes    uint64 `json:"traceBytes"`
	MaxTraceCount int    `json:"maxTraceCount"`
}

BenchmarkMergeStagingLimits reports the effective limits used by the trace sampler staging path.

type BenchmarkMergeStatus added in v0.11.0

type BenchmarkMergeStatus struct {
	OldestTimestamp int64  `json:"oldestTimestamp"`
	CoreBytes       uint64 `json:"coreBytes"`
	CoreParts       int    `json:"coreParts"`
	QueuedMerges    int    `json:"queuedMerges"`
	RunningMerges   int    `json:"runningMerges"`
	InFlightParts   int    `json:"inFlightParts"`
}

BenchmarkMergeStatus summarizes current picker and part-backlog state without scanning part contents.

type BenchmarkOneMergeOptions added in v0.11.0

type BenchmarkOneMergeOptions struct {
	LogicalNow              time.Time
	ExpectedSelectionSHA256 string
	RequireAllMature        bool
}

BenchmarkOneMergeOptions defines the clock and expected picker result for one controlled mature merge.

type BenchmarkPartReceiver added in v0.11.0

type BenchmarkPartReceiver struct {
	// contains filtered or unexported fields
}

BenchmarkPartReceiver exposes the production part-receipt and query paths to the trace merge benchmark.

func NewBenchmarkMergeReceiver added in v0.11.0

func NewBenchmarkMergeReceiver(root string, options BenchmarkMergeReceiverOptions) (*BenchmarkPartReceiver, error)

NewBenchmarkMergeReceiver opens the production merge loop with benchmark recording enabled.

func NewBenchmarkPartReceiver added in v0.11.0

func NewBenchmarkPartReceiver(root string) (*BenchmarkPartReceiver, error)

NewBenchmarkPartReceiver opens a merge-disabled table for deterministic fixture ingestion.

func (*BenchmarkPartReceiver) ActivePartIDs added in v0.11.0

func (bpr *BenchmarkPartReceiver) ActivePartIDs() ([]uint64, error)

ActivePartIDs returns the core part IDs referenced by the current durable snapshot.

func (*BenchmarkPartReceiver) AdvanceMergeTime added in v0.11.0

func (bpr *BenchmarkPartReceiver) AdvanceMergeTime(ctx context.Context, logicalNow time.Time, phase BenchmarkMergePhase) error

AdvanceMergeTime advances logical time, changes the report phase, triggers the picker, and drains all eligible work.

func (*BenchmarkPartReceiver) Close added in v0.11.0

func (bpr *BenchmarkPartReceiver) Close() error

Close releases the benchmark table.

func (*BenchmarkPartReceiver) ConsolidatedCompressedSizes added in v0.11.0

func (bpr *BenchmarkPartReceiver) ConsolidatedCompressedSizes(ctx context.Context, targetPartCount int) (BenchmarkConsolidatedSizes, error)

ConsolidatedCompressedSizes rewrites the received parts into the requested number of temporary production merge outputs.

func (*BenchmarkPartReceiver) EnableMergeRecording added in v0.11.0

func (bpr *BenchmarkPartReceiver) EnableMergeRecording(options BenchmarkMergeRecordingOptions) error

EnableMergeRecording installs benchmark-only per-merge recording on this receiver.

func (*BenchmarkPartReceiver) MergeInventory added in v0.11.0

func (bpr *BenchmarkPartReceiver) MergeInventory() (BenchmarkMergeInventory, error)

MergeInventory returns durable core and secondary-index row, byte, and part totals.

func (*BenchmarkPartReceiver) MergePartDepths added in v0.11.0

func (bpr *BenchmarkPartReceiver) MergePartDepths() (map[uint64]uint32, error)

MergePartDepths returns the benchmark-only merge generation of every active core part.

func (*BenchmarkPartReceiver) MergeRecordingReport added in v0.11.0

func (bpr *BenchmarkPartReceiver) MergeRecordingReport() (BenchmarkMergeReport, error)

MergeRecordingReport returns a consistent completed-event and aggregate snapshot.

func (*BenchmarkPartReceiver) MergeStagingLimits added in v0.11.0

func (bpr *BenchmarkPartReceiver) MergeStagingLimits() (BenchmarkMergeStagingLimits, error)

MergeStagingLimits returns the memory-derived byte and trace-count limits used by sampler evaluation.

func (*BenchmarkPartReceiver) MergeStatus added in v0.11.0

func (bpr *BenchmarkPartReceiver) MergeStatus() (BenchmarkMergeStatus, error)

MergeStatus returns a low-cost snapshot of current merge and core-part backlog.

func (*BenchmarkPartReceiver) PreviewMergeSelection added in v0.11.0

func (bpr *BenchmarkPartReceiver) PreviewMergeSelection() (BenchmarkMergeEvent, error)

PreviewMergeSelection reports the next selection from the production merge policy without dispatching it.

func (*BenchmarkPartReceiver) PublishExistingPart added in v0.11.0

func (bpr *BenchmarkPartReceiver) PublishExistingPart(partID uint64, corePath string, indexPaths map[string]string, logicalNow time.Time) error

PublishExistingPart introduces an atomically published core part and its matching secondary-index parts.

func (*BenchmarkPartReceiver) QueryIndex added in v0.11.0

func (bpr *BenchmarkPartReceiver) QueryIndex(ctx context.Context, name string, request sidx.QueryRequest) ([]*sidx.QueryResponse, error)

QueryIndex executes the keyed secondary-index query path.

func (*BenchmarkPartReceiver) QueryTrace added in v0.11.0

func (bpr *BenchmarkPartReceiver) QueryTrace(ctx context.Context, traceID string, minTimestamp, maxTimestamp int64,
	schemaTagTypes map[string]pbv1.ValueType,
) ([]model.TraceResult, error)

QueryTrace executes the native trace block query path for one trace ID.

func (*BenchmarkPartReceiver) Receive added in v0.11.0

func (bpr *BenchmarkPartReceiver) Receive(ctx context.Context, corePath string, indexPaths map[string]string) (receiveErr error)

Receive streams index parts followed by one core part through the normal data-node receipt callback.

func (*BenchmarkPartReceiver) Reopen added in v0.11.0

func (bpr *BenchmarkPartReceiver) Reopen() error

Reopen closes and reloads the table, exercising persisted core and index snapshots.

func (*BenchmarkPartReceiver) Root added in v0.11.0

func (bpr *BenchmarkPartReceiver) Root() string

Root returns the receiver's trace-table directory.

func (*BenchmarkPartReceiver) RunFinalizeRound added in v0.11.0

func (bpr *BenchmarkPartReceiver) RunFinalizeRound(ctx context.Context, logicalNow time.Time, grace time.Duration) (bool, error)

RunFinalizeRound runs one production finalization round against all parts cooled at logicalNow.

func (*BenchmarkPartReceiver) RunOneMerge added in v0.11.0

RunOneMerge executes exactly one production-picker merge and leaves recursive work blocked.

func (*BenchmarkPartReceiver) ScanIndex added in v0.11.0

func (bpr *BenchmarkPartReceiver) ScanIndex(ctx context.Context, name string, request sidx.ScanQueryRequest) ([]*sidx.QueryResponse, error)

ScanIndex executes the secondary-index full-scan query path.

func (*BenchmarkPartReceiver) ScanRawIndex added in v0.11.0

func (bpr *BenchmarkPartReceiver) ScanRawIndex(ctx context.Context, name string, visit func(sidx.RawRow) error) error

ScanRawIndex visits every physical secondary-index row without query deduplication.

func (*BenchmarkPartReceiver) SetMergeRecordingPhase added in v0.11.0

func (bpr *BenchmarkPartReceiver) SetMergeRecordingPhase(phase BenchmarkMergePhase) error

SetMergeRecordingPhase changes the bounded phase assigned to subsequently started merges.

func (*BenchmarkPartReceiver) TraceFragmentMaybeOutsideSelection added in v0.11.0

func (bpr *BenchmarkPartReceiver) TraceFragmentMaybeOutsideSelection(selectedPartIDs []uint64, traceID string,
	minTimestamp, maxTimestamp int64, grace time.Duration,
) (bool, error)

TraceFragmentMaybeOutsideSelection reports whether the persisted fragment guard would defer dropping a trace because an outside candidate part may contain it.

func (*BenchmarkPartReceiver) WaitForMergeIdle added in v0.11.0

func (bpr *BenchmarkPartReceiver) WaitForMergeIdle(ctx context.Context) error

WaitForMergeIdle waits until the production picker and both merge lanes have no remaining work.

type DumpRow added in v0.11.0

type DumpRow = PartEncoderRow

DumpRow is one trace span for BuildPartForDump. IndexSeries is ignored by the core encoder and carries source index-series identity for fixture generation.

func BuildPartForDump added in v0.11.0

func BuildPartForDump(tmpPath string, fileSystem fs.FileSystem, partID uint64, rows []DumpRow) (string, []DumpRow, func())

BuildPartForDump writes spans into a trace part at root/<partID>, returning the part directory, the rows for verification and a cleanup func.

func EntityDumpRows added in v0.11.0

func EntityDumpRows(entities []string) []DumpRow

EntityDumpRows returns one span per entity, each carrying a single meta.name string tag with a distinct traceID and spanID.

func StandardDumpRows added in v0.11.0

func StandardDumpRows() []DumpRow

StandardDumpRows returns the canonical trace fixture: three spans across two trace IDs, each carrying string / int64 / timestamp / string-array tags plus a binary span payload.

type DumpTag added in v0.11.0

type DumpTag = PartEncoderTag

DumpTag describes one (flat) tag of a trace span for the dump test builder. Value is a Go-native value: string, int64, []string, []int64, []byte or Timestamp. RawValue and ValueType preserve an already-marshaled storage value.

type EncodedTimestamp added in v0.11.0

type EncodedTimestamp int64

EncodedTimestamp marks an encoded tag value as a timestamp carrying Unix nanoseconds.

type NodeSelector

type NodeSelector interface {
	Locate(group, name string, shardID, replicaID uint32) (string, error)
	fmt.Stringer
}

NodeSelector provides functionality to locate nodes for data distribution.

type PartEncoderRow added in v0.11.0

type PartEncoderRow struct {
	IndexSeries map[string]common.SeriesID
	IndexTags   map[string][]sidx.Tag
	TraceID     string
	SpanID      string
	Span        []byte
	Tags        []PartEncoderTag
	Timestamp   int64
}

PartEncoderRow is one span accepted by EncodePart. IndexSeries is ignored by the core encoder and preserves source series identity for companion indexes.

type PartEncoderTag added in v0.11.0

type PartEncoderTag struct {
	Value     any
	Name      string
	RawValue  []byte
	ValueType pbv1.ValueType
}

PartEncoderTag is one flat tag accepted by the production trace part encoder.

type ProjectedSnapshotScanner added in v0.12.0

type ProjectedSnapshotScanner struct {
	// contains filtered or unexported fields
}

ProjectedSnapshotScanner assembles immutable source parts in trace-ID order. It owns temporary merge runs but does not own or remove the source snapshot.

func NewProjectedSnapshotScanner added in v0.12.0

func NewProjectedSnapshotScanner(ctx context.Context, partPaths []string, projection sdk.Projection,
	options SnapshotScanOptions,
) (scanner *ProjectedSnapshotScanner, err error)

NewProjectedSnapshotScanner prepares bounded external metadata merge runs.

func (*ProjectedSnapshotScanner) Close added in v0.12.0

func (s *ProjectedSnapshotScanner) Close() error

Close releases scan handles and temporary runs. Source parts are preserved.

func (*ProjectedSnapshotScanner) Next added in v0.12.0

func (s *ProjectedSnapshotScanner) Next(ctx context.Context) (result *SnapshotTrace, err error)

Next returns the next whole trace, or io.EOF after the immutable inventory ends.

type Query

type Query interface {
	LoadGroup(name string) (schema.Group, bool)
	Trace(metadata *commonv1.Metadata) (Trace, error)
	GetRemovalSegmentsTimeRange(group string) *timestamp.TimeRange
}

Query allows retrieving traces.

type SchemaService

type SchemaService interface {
	Query
	Close()
}

SchemaService allows querying schema information.

type Service

type Service interface {
	run.PreRunner
	run.Config
	run.Service
	Query
	CollectDataInfo(context.Context, string) (*databasev1.DataInfo, error)
	CollectLiaisonInfo(context.Context, string) (*databasev1.LiaisonInfo, error)
}

Service allows inspecting the trace data.

func LiaisonService

func LiaisonService(_ context.Context) (Service, error)

LiaisonService returns a new liaison service (deprecated - use NewLiaison).

func NewLiaison

func NewLiaison(metadata metadata.Repo, pipeline queue.Server, omr observability.MetricsRegistry, pm protector.Memory,
	dataNodeSelector node.Selector, tire2Client queue.Client,
) (Service, error)

NewLiaison creates a new trace liaison service with the given dependencies.

func NewService

func NewService(metadata metadata.Repo, pipeline queue.Server, omr observability.MetricsRegistry, pm protector.Memory) (Service, error)

NewService returns a new service.

type SnapshotScanOptions added in v0.12.0

type SnapshotScanOptions struct {
	TempDir          string
	MaxMetadataBytes int64
	MaxTraceBytes    int64
	MaxOpenReaders   int
}

SnapshotScanOptions bounds scratch metadata, merge fan-in and assembled trace bytes.

type SnapshotTrace added in v0.12.0

type SnapshotTrace struct {
	Trace         sdk.TraceBlock
	SpanCount     uint64
	InputConflict bool
	Oversized     bool
	CoverageKnown bool
}

SnapshotTrace is one whole local trace. Oversized traces have no projected payload. The returned columns are independently owned and survive subsequent scanner calls.

type Timestamp added in v0.11.0

type Timestamp = EncodedTimestamp

Timestamp marks a DumpTag value as a ValueType=Timestamp tag carrying nanos since the epoch (trace stores its per-span time in such a tag).

type Trace

type Trace interface {
	GetSchema() *databasev1.Trace
	GetIndexRules() []*databasev1.IndexRule
	Query(ctx context.Context, opts model.TraceQueryOptions) (model.TraceQueryResult, error)
}

Trace allows inspecting trace details.

type Visitor added in v0.10.0

type Visitor interface {
	// VisitSeries visits the series index directory for a segment.
	VisitSeries(segmentTR *timestamp.TimeRange, seriesIndexPath string, shardIDs []common.ShardID) error
	// VisitShard visits the shard directory for a segment.
	VisitShard(segmentTR *timestamp.TimeRange, shardID common.ShardID, segmentPath string) error
}

Visitor defines the interface for visiting trace components.

Jump to

Keyboard shortcuts

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