attributetable

package
v1.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveAnnotations

func ResolveAnnotations(refs []int64, table *queryv1.AttributeTable) []*typesv1.ProfileAnnotation

ResolveAnnotations converts attribute references to profile annotations.

func ResolveExemplars

func ResolveExemplars(exemplars []*queryv1.Exemplar, table *queryv1.AttributeTable) []*typesv1.Exemplar

ResolveExemplars converts compact exemplars to public exemplars by resolving attribute refs.

func ResolveHeatmapExemplar

func ResolveHeatmapExemplar(point *queryv1.HeatmapPoint, table *queryv1.AttributeTable) *typesv1.Exemplar

ResolveHeatmapExemplar converts a HeatmapPoint to a public Exemplar by resolving attribute refs, profile ID (table lookup), and span ID (hex encoding).

func ResolveLabelPairs

func ResolveLabelPairs(refs []int64, table *queryv1.AttributeTable) []*typesv1.LabelPair

ResolveLabelPairs converts attribute references to label pairs.

func SpanIDToHex

func SpanIDToHex(spanID uint64) string

SpanIDToHex converts a uint64 span ID to a hex string

Types

type Key

type Key struct {
	Key   unique.Handle[string]
	Value unique.Handle[string]
}

type Merger

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

Merger provides generic merging functionality for series with attribute tables.

func NewMerger

func NewMerger() *Merger

NewMerger creates a new generic merger.

func (*Merger) BuildAttributeTable

func (m *Merger) BuildAttributeTable(res *queryv1.AttributeTable) *queryv1.AttributeTable

BuildAttributeTable builds the protobuf AttributeTable from the merger's table.

func (*Merger) Merge

func (m *Merger) Merge(table *queryv1.AttributeTable, f func(*Remapper))

Merge adds entries from the input attribute table to the merger's attribute table and returns a remapper, remapper only safe to use during callback

type Remapper

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

func (*Remapper) Ref

func (r *Remapper) Ref(ref int64) int64

Ref remaps a single attribute ref.

func (*Remapper) Refs

func (r *Remapper) Refs(refs []int64) []int64

Refs remaps a slice of attribute refs.

type Table

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

Table is used to store attribute key-value pairs for efficient lookup and deduplication. It maps attribute keys to integer references, allowing compact representation of labels.

func New

func New() *Table

func (*Table) AnnotationRefs

func (t *Table) AnnotationRefs(keys, values []string, refs []int64) []int64

func (*Table) Build

func (*Table) LookupOrAdd

func (t *Table) LookupOrAdd(k Key) int64

func (*Table) Refs

func (t *Table) Refs(lbls model.Labels, refs []int64) []int64

Jump to

Keyboard shortcuts

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