tracedata

package
v0.0.0-...-213048f Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	// Arrival time the first span for the trace was received.
	ArrivalTime time.Time
	// EarliestStartTime is the time of the earliest start of a span that we've seen for this trace.
	EarliestStartTime pcommon.Timestamp
	// LatestEndTime is the latest time of the latest end to a span that we've seen for this trace.
	LatestEndTime pcommon.Timestamp
	// SpanCount track the number of spans on the trace.
	SpanCount int32
	// Priority of the trace data. May be used to tier caching.
	Priority priority.Priority
	// LastLowPriorityDecisionName is the policy's name that was previously made decision to low priority.
	LastLowPriorityDecisionName *string
}

func (*Metadata) DeepCopy

func (m *Metadata) DeepCopy() *Metadata

DeepCopy returns a deep copy of this Metadata

func (*Metadata) MergeWith

func (m *Metadata) MergeWith(other *Metadata)

MergeWith merges the data from the other Metadata into this Metadata It modifies the current Metadata instance(i.e. `m`) but does not modify the other Metadata provided(i.e. `other`)

type TraceData

type TraceData struct {
	Metadata *Metadata
	// contains filtered or unexported fields
}

TraceData stores the sampling related trace data. The zero value for this type is invalid, use NewTraceData to create.

func NewTraceData

func NewTraceData(arrival time.Time, traces ptrace.Traces, p priority.Priority, compress bool) (*TraceData, error)

NewTraceData creates a new TraceData given traces This function cannot return an error if compress is false

func (*TraceData) AbsorbTraceData

func (td *TraceData) AbsorbTraceData(other *TraceData) error

AbsorbTraceData merges the data from the other TraceData into this TraceData. It modifies both the current TraceData instance (td) and the one passed in (other). other MUST NOT be used after calling this function, as it's trace data is moved into td.

func (*TraceData) GetPriority

func (td *TraceData) GetPriority() priority.Priority

GetPriority implements priority.Getter

func (*TraceData) GetTraces

func (td *TraceData) GetTraces() (ptrace.Traces, error)

GetTraces returns all batches received for the trace The traces returned should not be modified by the caller, AbsorbTraceData should be used to add data to a TraceData instead.

Jump to

Keyboard shortcuts

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