heatmap

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultYAxisBuckets is the default number of Y-axis buckets
	DefaultYAxisBuckets = 20
)

Variables

This section is empty.

Functions

func NewHeatmapReportIterator

func NewHeatmapReportIterator(reports []*queryv1.HeatmapReport) iter.Iterator[HeatmapValue]

NewHeatmapReportIterator creates an iterator from multiple heatmap reports

func RangeHeatmap

func RangeHeatmap(
	reports []*queryv1.HeatmapReport,
	start, end, step int64,
	exemplarType typesv1.ExemplarType,
) []*typesv1.HeatmapSeries

RangeHeatmap buckets heatmap points into time/value buckets for visualization Each input series produces a separate output series with labels preserved Y-axis buckets are calculated based on global min/max across all series

func TopSeries

func TopSeries(s []*typesv1.HeatmapSeries, k int) []*typesv1.HeatmapSeries

TopSeries returns the top k heatmap series by sum of counts.

Types

type Builder

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

func NewBuilder

func NewBuilder(by []string) *Builder

func (*Builder) Add

func (h *Builder) Add(fp prommodel.Fingerprint, labels model.Labels, ts int64, profileID string, spanID uint64, value int64)

func (*Builder) Build

func (h *Builder) Build(report *queryv1.HeatmapReport) *queryv1.HeatmapReport

type HeatmapSeriesIterator

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

HeatmapSeriesIterator iterates over points in a heatmap series

func NewHeatmapSeriesIterator

func NewHeatmapSeriesIterator(points []*queryv1.HeatmapPoint) *HeatmapSeriesIterator

NewHeatmapSeriesIterator creates a new iterator for a heatmap series

func (*HeatmapSeriesIterator) At

At returns the current heatmap value

func (*HeatmapSeriesIterator) Close

func (it *HeatmapSeriesIterator) Close() error

Close closes the iterator

func (*HeatmapSeriesIterator) Err

func (it *HeatmapSeriesIterator) Err() error

Err returns any error encountered during iteration

func (*HeatmapSeriesIterator) Next

func (it *HeatmapSeriesIterator) Next() bool

Next advances the iterator to the next point

type HeatmapValue

type HeatmapValue struct {
	Timestamp     int64
	Value         int64
	ProfileId     int64
	SpanId        uint64
	AttributeRefs []int64
}

HeatmapValue represents a single heatmap point value

type Merger

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

func NewMerger

func NewMerger(sum bool) *Merger

NewMerger creates a new heatmap merger. If sum is set, points with matching timestamps, profileIDs, and spanIDs have their values summed.

func (*Merger) Build

func (m *Merger) Build() *queryv1.HeatmapReport

Build returns the merged heatmap report

func (*Merger) IsEmpty

func (m *Merger) IsEmpty() bool

IsEmpty returns true if no series have been merged

func (*Merger) MergeHeatmap

func (m *Merger) MergeHeatmap(report *queryv1.HeatmapReport)

MergeHeatmap adds a heatmap report to the merger

Jump to

Keyboard shortcuts

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