Versions in this module Expand all Collapse all v2 v2.0.1 Apr 22, 2026 v2.0.0 Apr 22, 2026 Changes in this version + const ActionDrop + const ActionPassThrough + const DefaultDerivedMetricFlushWindow + const GuancePickKey + const GuanceRoutingKey + const PipelineActionDrop + const PipelineActionKeep + const PipelineTypeCondition + const PipelineTypeSampling + const Seed1 + const Seed2 + const SeedU32 + const TailSamplingDerivedMeasurement + var ErrIntOverflowAggrbatch = fmt.Errorf("proto: integer overflow") + var ErrIntOverflowTsdata = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthAggrbatch = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthTsdata = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupAggrbatch = fmt.Errorf("proto: unexpected end of group") + var ErrUnexpectedEndOfGroupTsdata = fmt.Errorf("proto: unexpected end of group") + func AlignNextWallTime(t time.Time, align time.Duration) int64 + func HashCombine(seed, hash uint64) uint64 + func HashToken(token string, hash64 uint64) uint64 + func PickTrace(source string, pts []*point.Point, version int64) map[uint64]*DataPacket + func SampleStdDev(data []float64) (float64, error) + func SetLogging(log *logger.Logger) + type Action string + type AggregateRule struct + Algorithms map[string]*AggregationAlgoConfig + Groupby []string + Name string + Selector *RuleSelector + func (ar *AggregateRule) GroupbyBatch(ac *AggregatorConfigure, pts []*point.Point) (batches []*AggregationBatch) + func (ar *AggregateRule) GroupbyPoints(pts []*point.Point) map[uint64][]*point.Point + func (ar *AggregateRule) SelectPoints(pts []*point.Point) []*point.Point + type AggregationAlgo struct + AddTags map[string]string + Method string + Options isAggregationAlgo_Options + SourceField string + Window int64 + func (*AggregationAlgo) Descriptor() ([]byte, []int) + func (*AggregationAlgo) ProtoMessage() + func (*AggregationAlgo) XXX_OneofWrappers() []interface{} + func (m *AggregationAlgo) GetAddTags() map[string]string + func (m *AggregationAlgo) GetExpoOpts() *ExpoHistogramOptions + func (m *AggregationAlgo) GetHistogramOpts() *HistogramOptions + func (m *AggregationAlgo) GetMethod() string + func (m *AggregationAlgo) GetOptions() isAggregationAlgo_Options + func (m *AggregationAlgo) GetQuantileOpts() *QuantileOptions + func (m *AggregationAlgo) GetSourceField() string + func (m *AggregationAlgo) GetWindow() int64 + func (m *AggregationAlgo) Marshal() (dAtA []byte, err error) + func (m *AggregationAlgo) MarshalTo(dAtA []byte) (int, error) + func (m *AggregationAlgo) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AggregationAlgo) Reset() + func (m *AggregationAlgo) Size() (n int) + func (m *AggregationAlgo) Unmarshal(dAtA []byte) error + func (m *AggregationAlgo) XXX_DiscardUnknown() + func (m *AggregationAlgo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *AggregationAlgo) XXX_Merge(src proto.Message) + func (m *AggregationAlgo) XXX_Size() int + func (m *AggregationAlgo) XXX_Unmarshal(b []byte) error + func (this *AggregationAlgo) Equal(that interface{}) bool + func (this *AggregationAlgo) GoString() string + func (this *AggregationAlgo) String() string + type AggregationAlgoConfig struct + AddTags map[string]string + ExpoOpts *ExpoHistogramOptions + HistogramOpts *HistogramOptions + Method string + QuantileOpts *QuantileOptions + SourceField string + Window int64 + func (cfg *AggregationAlgoConfig) ToAggregationAlgo() *AggregationAlgo + type AggregationAlgo_ExpoOpts struct + ExpoOpts *ExpoHistogramOptions + func (m *AggregationAlgo_ExpoOpts) MarshalTo(dAtA []byte) (int, error) + func (m *AggregationAlgo_ExpoOpts) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AggregationAlgo_ExpoOpts) Size() (n int) + func (this *AggregationAlgo_ExpoOpts) Equal(that interface{}) bool + func (this *AggregationAlgo_ExpoOpts) GoString() string + func (this *AggregationAlgo_ExpoOpts) String() string + type AggregationAlgo_HistogramOpts struct + HistogramOpts *HistogramOptions + func (m *AggregationAlgo_HistogramOpts) MarshalTo(dAtA []byte) (int, error) + func (m *AggregationAlgo_HistogramOpts) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AggregationAlgo_HistogramOpts) Size() (n int) + func (this *AggregationAlgo_HistogramOpts) Equal(that interface{}) bool + func (this *AggregationAlgo_HistogramOpts) GoString() string + func (this *AggregationAlgo_HistogramOpts) String() string + type AggregationAlgo_QuantileOpts struct + QuantileOpts *QuantileOptions + func (m *AggregationAlgo_QuantileOpts) MarshalTo(dAtA []byte) (int, error) + func (m *AggregationAlgo_QuantileOpts) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AggregationAlgo_QuantileOpts) Size() (n int) + func (this *AggregationAlgo_QuantileOpts) Equal(that interface{}) bool + func (this *AggregationAlgo_QuantileOpts) GoString() string + func (this *AggregationAlgo_QuantileOpts) String() string + type AggregationBatch struct + AggregationOpts map[string]*AggregationAlgo + ConfigHash uint64 + PickKey uint64 + Points *point.PBPoints + RawConfig []byte + RoutingKey uint64 + func (*AggregationBatch) Descriptor() ([]byte, []int) + func (*AggregationBatch) ProtoMessage() + func (m *AggregationBatch) GetAggregationOpts() map[string]*AggregationAlgo + func (m *AggregationBatch) GetConfigHash() uint64 + func (m *AggregationBatch) GetPickKey() uint64 + func (m *AggregationBatch) GetPoints() *point.PBPoints + func (m *AggregationBatch) GetRawConfig() []byte + func (m *AggregationBatch) GetRoutingKey() uint64 + func (m *AggregationBatch) Marshal() (dAtA []byte, err error) + func (m *AggregationBatch) MarshalTo(dAtA []byte) (int, error) + func (m *AggregationBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AggregationBatch) Reset() + func (m *AggregationBatch) Size() (n int) + func (m *AggregationBatch) Unmarshal(dAtA []byte) error + func (m *AggregationBatch) XXX_DiscardUnknown() + func (m *AggregationBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *AggregationBatch) XXX_Merge(src proto.Message) + func (m *AggregationBatch) XXX_Size() int + func (m *AggregationBatch) XXX_Unmarshal(b []byte) error + func (this *AggregationBatch) Equal(that interface{}) bool + func (this *AggregationBatch) GoString() string + func (this *AggregationBatch) String() string + type AggregatorConfigure struct + AggregateRules []*AggregateRule + DefaultAction Action + DefaultWindow time.Duration + DeleteRulesPoint bool + func (ac *AggregatorConfigure) PickPoints(category string, pts []*point.Point) map[uint64]*Batchs + func (ac *AggregatorConfigure) SelectPoints(pts []*point.Point) (groups [][]*point.Point) + func (ac *AggregatorConfigure) Setup() error + func (ac *AggregatorConfigure) UnmarshalTOML(data interface{}) error + type AlgoMethod string + const AVG + const COUNT + const COUNT_DISTINCT + const EXPO_HISTOGRAM + const FIRST + const HISTOGRAM + const LAST + const MAX + const METHOD_UNSPECIFIED + const MIN + const QUANTILES + const STDEV + const SUM + func NormalizeAlgoMethod(raw string) AlgoMethod + func (m AlgoMethod) String() string + type Batchs struct + Batchs []*AggregationBatch + PickKey uint64 + func (*Batchs) Descriptor() ([]byte, []int) + func (*Batchs) ProtoMessage() + func (m *Batchs) GetBatchs() []*AggregationBatch + func (m *Batchs) GetPickKey() uint64 + func (m *Batchs) Marshal() (dAtA []byte, err error) + func (m *Batchs) MarshalTo(dAtA []byte) (int, error) + func (m *Batchs) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Batchs) Reset() + func (m *Batchs) Size() (n int) + func (m *Batchs) Unmarshal(dAtA []byte) error + func (m *Batchs) XXX_DiscardUnknown() + func (m *Batchs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Batchs) XXX_Merge(src proto.Message) + func (m *Batchs) XXX_Size() int + func (m *Batchs) XXX_Unmarshal(b []byte) error + func (this *Batchs) Equal(that interface{}) bool + func (this *Batchs) GoString() string + func (this *Batchs) String() string + type BuiltinMetricCfg struct + Enabled bool + Name string + type Cache struct + Expired time.Duration + WindowsBuckets map[int64]*Windows + func NewCache(exp time.Duration) *Cache + func (c *Cache) AddBatch(token string, batch *AggregationBatch) (n, expN int) + func (c *Cache) AddBatchs(token string, batchs []*AggregationBatch) (n, expN int) + func (c *Cache) GetAndSetBucket(exp int64, token string, cal Calculator) + func (c *Cache) GetExpWidows() []*Window + type Calculator interface + Add func(any) + Aggr func() ([]*point.Point, error) + Base func() *MetricBase + Reset func() + ToString func() string + type DataBatch struct + CollectorId string + Packets []*DataPacket + func (*DataBatch) Descriptor() ([]byte, []int) + func (*DataBatch) ProtoMessage() + func (m *DataBatch) GetCollectorId() string + func (m *DataBatch) GetPackets() []*DataPacket + func (m *DataBatch) Marshal() (dAtA []byte, err error) + func (m *DataBatch) MarshalTo(dAtA []byte) (int, error) + func (m *DataBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *DataBatch) Reset() + func (m *DataBatch) Size() (n int) + func (m *DataBatch) Unmarshal(dAtA []byte) error + func (m *DataBatch) XXX_DiscardUnknown() + func (m *DataBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DataBatch) XXX_Merge(src proto.Message) + func (m *DataBatch) XXX_Size() int + func (m *DataBatch) XXX_Unmarshal(b []byte) error + func (this *DataBatch) Equal(that interface{}) bool + func (this *DataBatch) GoString() string + func (this *DataBatch) String() string + type DataGroup struct + ExpiredTime int64 + FirstSeen time.Time + func (dg *DataGroup) Reset() + type DataPacket struct + ConfigVersion int64 + DataType string + GroupIdHash uint64 + GroupKey string + HasError bool + MaxPointTimeUnixNano int64 + PointCount int32 + PointsPayload []byte + RawGroupId string + Source string + Token string + TraceEndTimeUnixNano int64 + TraceStartTimeUnixNano int64 + func (*DataPacket) Descriptor() ([]byte, []int) + func (*DataPacket) ProtoMessage() + func (m *DataPacket) GetConfigVersion() int64 + func (m *DataPacket) GetDataType() string + func (m *DataPacket) GetGroupIdHash() uint64 + func (m *DataPacket) GetGroupKey() string + func (m *DataPacket) GetHasError() bool + func (m *DataPacket) GetMaxPointTimeUnixNano() int64 + func (m *DataPacket) GetPointCount() int32 + func (m *DataPacket) GetPointsPayload() []byte + func (m *DataPacket) GetRawGroupId() string + func (m *DataPacket) GetSource() string + func (m *DataPacket) GetToken() string + func (m *DataPacket) GetTraceEndTimeUnixNano() int64 + func (m *DataPacket) GetTraceStartTimeUnixNano() int64 + func (m *DataPacket) Marshal() (dAtA []byte, err error) + func (m *DataPacket) MarshalTo(dAtA []byte) (int, error) + func (m *DataPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *DataPacket) Reset() + func (m *DataPacket) Size() (n int) + func (m *DataPacket) Unmarshal(dAtA []byte) error + func (m *DataPacket) XXX_DiscardUnknown() + func (m *DataPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DataPacket) XXX_Merge(src proto.Message) + func (m *DataPacket) XXX_Size() int + func (m *DataPacket) XXX_Unmarshal(b []byte) error + func (packet *DataPacket) WalkRawPBPoints(fn func([]byte) bool) error + func (this *DataPacket) Equal(that interface{}) bool + func (this *DataPacket) GoString() string + func (this *DataPacket) String() string + type DerivedMetric struct + Condition string + Groupby []string + Name string + Type AlgoMethod + type DerivedMetricCollector struct + func NewDerivedMetricCollector(window time.Duration) *DerivedMetricCollector + func (c *DerivedMetricCollector) Add(records []DerivedMetricRecord) + func (c *DerivedMetricCollector) Flush(now time.Time) []*DerivedMetricPoints + func (c *DerivedMetricCollector) String() string + type DerivedMetricDecision string + const DerivedMetricDecisionDropped + const DerivedMetricDecisionKept + const DerivedMetricDecisionUnknown + type DerivedMetricKind string + const DerivedMetricKindHistogram + const DerivedMetricKindSum + type DerivedMetricPoints struct + PTS []*point.Point + Token string + type DerivedMetricRecord struct + Buckets []float64 + DataType string + Decision DerivedMetricDecision + Kind DerivedMetricKind + Measurement string + MetricName string + Stage DerivedMetricStage + Tags map[string]string + Time time.Time + Token string + Value float64 + type DerivedMetricStage string + const DerivedMetricStageDecision + const DerivedMetricStageIngest + const DerivedMetricStagePreDecision + type ExpoHistogramOptions struct + MaxBuckets int32 + MaxScale int32 + RecordMinMax bool + func (*ExpoHistogramOptions) Descriptor() ([]byte, []int) + func (*ExpoHistogramOptions) ProtoMessage() + func (m *ExpoHistogramOptions) GetMaxBuckets() int32 + func (m *ExpoHistogramOptions) GetMaxScale() int32 + func (m *ExpoHistogramOptions) GetRecordMinMax() bool + func (m *ExpoHistogramOptions) Marshal() (dAtA []byte, err error) + func (m *ExpoHistogramOptions) MarshalTo(dAtA []byte) (int, error) + func (m *ExpoHistogramOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *ExpoHistogramOptions) Reset() + func (m *ExpoHistogramOptions) Size() (n int) + func (m *ExpoHistogramOptions) Unmarshal(dAtA []byte) error + func (m *ExpoHistogramOptions) XXX_DiscardUnknown() + func (m *ExpoHistogramOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ExpoHistogramOptions) XXX_Merge(src proto.Message) + func (m *ExpoHistogramOptions) XXX_Size() int + func (m *ExpoHistogramOptions) XXX_Unmarshal(b []byte) error + func (this *ExpoHistogramOptions) Equal(that interface{}) bool + func (this *ExpoHistogramOptions) GoString() string + func (this *ExpoHistogramOptions) String() string + type GlobalSampler struct + func NewGlobalSampler(shardCount int, waitTime time.Duration) *GlobalSampler + func (s *GlobalSampler) AdvanceTime() map[uint64]*DataGroup + func (s *GlobalSampler) GetLoggingConfig(token string) *LoggingTailSampling + func (s *GlobalSampler) GetRUMConfig(token string) *RUMTailSampling + func (s *GlobalSampler) GetTraceConfig(token string) *TraceTailSampling + func (s *GlobalSampler) Ingest(packet *DataPacket) + func (s *GlobalSampler) TailSamplingData(dataGroups map[uint64]*DataGroup) map[uint64]*DataPacket + func (s *GlobalSampler) TailSamplingOutcomes(dataGroups map[uint64]*DataGroup) map[uint64]*TailSamplingOutcome + func (s *GlobalSampler) UpdateConfig(token string, ts *TailSamplingConfigs) error + type HistogramOptions struct + Buckets []float64 + func (*HistogramOptions) Descriptor() ([]byte, []int) + func (*HistogramOptions) ProtoMessage() + func (m *HistogramOptions) GetBuckets() []float64 + func (m *HistogramOptions) Marshal() (dAtA []byte, err error) + func (m *HistogramOptions) MarshalTo(dAtA []byte) (int, error) + func (m *HistogramOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *HistogramOptions) Reset() + func (m *HistogramOptions) Size() (n int) + func (m *HistogramOptions) Unmarshal(dAtA []byte) error + func (m *HistogramOptions) XXX_DiscardUnknown() + func (m *HistogramOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *HistogramOptions) XXX_Merge(src proto.Message) + func (m *HistogramOptions) XXX_Size() int + func (m *HistogramOptions) XXX_Unmarshal(b []byte) error + func (this *HistogramOptions) Equal(that interface{}) bool + func (this *HistogramOptions) GoString() string + func (this *HistogramOptions) String() string + type LoggingGroupDimension struct + DerivedMetrics []*DerivedMetric + GroupKey string + Pipelines []*SamplingPipeline + func (logGroup *LoggingGroupDimension) PickLogging(source string, pts []*point.Point) (map[uint64]*DataPacket, []*point.Point) + type LoggingTailSampling struct + BuiltinMetrics []*BuiltinMetricCfg + DataTTL time.Duration + GroupDimensions []*LoggingGroupDimension + Version int64 + type MetricBase struct + func (mb *MetricBase) String() string + type PipelineAction string + type PipelineType string + type PointsData struct + PTS []*point.Point + Token string + func WindowsToData(ws []*Window) []*PointsData + type QuantileOptions struct + Percentiles []float64 + func (*QuantileOptions) Descriptor() ([]byte, []int) + func (*QuantileOptions) ProtoMessage() + func (m *QuantileOptions) GetPercentiles() []float64 + func (m *QuantileOptions) Marshal() (dAtA []byte, err error) + func (m *QuantileOptions) MarshalTo(dAtA []byte) (int, error) + func (m *QuantileOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *QuantileOptions) Reset() + func (m *QuantileOptions) Size() (n int) + func (m *QuantileOptions) Unmarshal(dAtA []byte) error + func (m *QuantileOptions) XXX_DiscardUnknown() + func (m *QuantileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QuantileOptions) XXX_Merge(src proto.Message) + func (m *QuantileOptions) XXX_Size() int + func (m *QuantileOptions) XXX_Unmarshal(b []byte) error + func (this *QuantileOptions) Equal(that interface{}) bool + func (this *QuantileOptions) GoString() string + func (this *QuantileOptions) String() string + type RUMGroupDimension struct + DerivedMetrics []*DerivedMetric + GroupKey string + Pipelines []*SamplingPipeline + func (rumGroup *RUMGroupDimension) PickRUM(source string, pts []*point.Point) (map[uint64]*DataPacket, []*point.Point) + type RUMTailSampling struct + BuiltinMetrics []*BuiltinMetricCfg + DataTTL time.Duration + GroupDimensions []*RUMGroupDimension + Version int64 + type RuleSelector struct + Category string + Condition string + Measurements []string + MetricName []string + func (rs *RuleSelector) Setup() error + type SamplingPipeline struct + Action PipelineAction + Condition string + HashKeys []string + Name string + Rate float64 + Type PipelineType + func (sp *SamplingPipeline) Apply() error + func (sp *SamplingPipeline) DoAction(td *DataPacket) (bool, *DataPacket) + type Shard struct + type TailSamplingBuiltinMetric interface + Name func() string + OnDecision func(packet *DataPacket, decision DerivedMetricDecision) []DerivedMetricRecord + OnIngest func(packet *DataPacket) []DerivedMetricRecord + OnPreDecision func(packet *DataPacket) []DerivedMetricRecord + type TailSamplingBuiltinMetrics []TailSamplingBuiltinMetric + func DefaultTailSamplingBuiltinMetrics() TailSamplingBuiltinMetrics + func (ms TailSamplingBuiltinMetrics) OnDecision(packet *DataPacket, decision DerivedMetricDecision) []DerivedMetricRecord + func (ms TailSamplingBuiltinMetrics) OnIngest(packet *DataPacket) []DerivedMetricRecord + func (ms TailSamplingBuiltinMetrics) OnPreDecision(packet *DataPacket) []DerivedMetricRecord + type TailSamplingConfigs struct + Logging *LoggingTailSampling + RUM *RUMTailSampling + Tracing *TraceTailSampling + Version int64 + func (t *TailSamplingConfigs) Init() error + func (t *TailSamplingConfigs) ToString() string + type TailSamplingOutcome struct + Decision DerivedMetricDecision + Packet *DataPacket + SourcePacket *DataPacket + type TailSamplingProcessor struct + func NewDefaultTailSamplingProcessor(shardCount int, waitTime time.Duration) *TailSamplingProcessor + func NewTailSamplingProcessor(sampler *GlobalSampler, collector *DerivedMetricCollector, ...) *TailSamplingProcessor + func (r *TailSamplingProcessor) AdvanceTime() map[uint64]*DataGroup + func (r *TailSamplingProcessor) BuiltinMetrics() TailSamplingBuiltinMetrics + func (r *TailSamplingProcessor) Collector() *DerivedMetricCollector + func (r *TailSamplingProcessor) FlushDerivedMetrics(now time.Time) []*DerivedMetricPoints + func (r *TailSamplingProcessor) IngestPacket(packet *DataPacket) + func (r *TailSamplingProcessor) RecordDecision(packet *DataPacket, decision DerivedMetricDecision) + func (r *TailSamplingProcessor) Sampler() *GlobalSampler + func (r *TailSamplingProcessor) TailSamplingData(dataGroups map[uint64]*DataGroup) map[uint64]*DataPacket + func (r *TailSamplingProcessor) UpdateConfig(token string, cfg *TailSamplingConfigs) error + type TraceTailSampling struct + BuiltinMetrics []*BuiltinMetricCfg + DataTTL time.Duration + DerivedMetrics []*DerivedMetric + GroupKey string + Pipelines []*SamplingPipeline + Version int64 + type Window struct + Token string + func (w *Window) AddCal(cal Calculator) + func (w *Window) Reset() + type Windows struct + IDs map[string]int + WS []*Window + func (ws *Windows) AddCal(token string, cal Calculator)