series

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinNamespaceMetric

func JoinNamespaceMetric(namespace, metricName string) string

JoinNamespaceMetric concat namespace and metric-name for storage with a delimiter

func SanitizeFieldName

func SanitizeFieldName(fieldName []byte) []byte

func SanitizeMetricName

func SanitizeMetricName(metricName string) string

SanitizeMetricName checks if metric-name is in necessary of sanitizing

func SanitizeNamespace

func SanitizeNamespace(namespace string) string

SanitizeNamespace checks if namespace is in necessary of sanitizing

func SanitizeNamespaceOrMetricName

func SanitizeNamespaceOrMetricName(name []byte) []byte

func ShouldSanitizeFieldName

func ShouldSanitizeFieldName(fieldName []byte) bool

func ShouldSanitizeNamespaceOrMetricName

func ShouldSanitizeNamespaceOrMetricName(name []byte) bool

Types

type RowBuilder

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

RowBuilder builds a flat metric in order.

func CreateRowBuilder

func CreateRowBuilder() *RowBuilder

CreateRowBuilder creates a new row builder, not reused builder.

func NewRowBuilder

func NewRowBuilder() (
	rb *RowBuilder,
	releaseFunc func(rb *RowBuilder),
)

NewRowBuilder picks a row builder from pool for building flat metric

func (*RowBuilder) AddCompoundFieldData

func (rb *RowBuilder) AddCompoundFieldData(values, bounds []float64) error

func (*RowBuilder) AddCompoundFieldMMSC

func (rb *RowBuilder) AddCompoundFieldMMSC(min, max, sum, count float64) error

func (*RowBuilder) AddExemplar added in v0.0.5

func (rb *RowBuilder) AddExemplar(name, traceID, spanID []byte, duration int64) error

AddExemplar appends a exemplar Return false if exemplar is invalid

func (*RowBuilder) AddMetricName

func (rb *RowBuilder) AddMetricName(metricName []byte)

func (*RowBuilder) AddNameSpace

func (rb *RowBuilder) AddNameSpace(namespace []byte)

func (*RowBuilder) AddSimpleField

func (rb *RowBuilder) AddSimpleField(fieldName []byte, fieldType flatMetricsV1.SimpleFieldType, fieldValue float64) error

AddSimpleField appends a simple field Return false if field is invalid

func (*RowBuilder) AddTag

func (rb *RowBuilder) AddTag(key, value []byte) error

AddTag appends a key-value pair Return false if tag is invalid

func (*RowBuilder) AddTimestamp

func (rb *RowBuilder) AddTimestamp(ts int64)

func (*RowBuilder) Build

func (rb *RowBuilder) Build() ([]byte, error)

func (*RowBuilder) ExemplarsLen added in v0.0.5

func (rb *RowBuilder) ExemplarsLen() int

func (*RowBuilder) Reset

func (rb *RowBuilder) Reset()

func (*RowBuilder) SimpleFieldsLen

func (rb *RowBuilder) SimpleFieldsLen() int

Jump to

Keyboard shortcuts

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