metricpb

package
v14.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetric = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetric   = fmt.Errorf("proto: integer overflow")
)
View Source
var Scope_name = map[int32]string{
	0: "Mixed",
	1: "Local",
	2: "Global",
}
View Source
var Scope_value = map[string]int32{
	"Mixed":  0,
	"Local":  1,
	"Global": 2,
}
View Source
var Type_name = map[int32]string{
	0: "Counter",
	1: "Gauge",
	2: "Histogram",
	3: "Set",
	4: "Timer",
}
View Source
var Type_value = map[string]int32{
	"Counter":   0,
	"Gauge":     1,
	"Histogram": 2,
	"Set":       3,
	"Timer":     4,
}

Functions

This section is empty.

Types

type CounterValue

type CounterValue struct {
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}

CounterValue wraps the value of a counter

func (*CounterValue) Descriptor

func (*CounterValue) Descriptor() ([]byte, []int)

func (*CounterValue) GetValue

func (m *CounterValue) GetValue() int64

func (*CounterValue) Marshal

func (m *CounterValue) Marshal() (dAtA []byte, err error)

func (*CounterValue) MarshalTo

func (m *CounterValue) MarshalTo(dAtA []byte) (int, error)

func (*CounterValue) ProtoMessage

func (*CounterValue) ProtoMessage()

func (*CounterValue) Reset

func (m *CounterValue) Reset()

func (*CounterValue) Size

func (m *CounterValue) Size() (n int)

func (*CounterValue) String

func (m *CounterValue) String() string

func (*CounterValue) Unmarshal

func (m *CounterValue) Unmarshal(dAtA []byte) error

func (*CounterValue) XXX_DiscardUnknown

func (m *CounterValue) XXX_DiscardUnknown()

func (*CounterValue) XXX_Marshal

func (m *CounterValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CounterValue) XXX_Merge

func (m *CounterValue) XXX_Merge(src proto.Message)

func (*CounterValue) XXX_Size

func (m *CounterValue) XXX_Size() int

func (*CounterValue) XXX_Unmarshal

func (m *CounterValue) XXX_Unmarshal(b []byte) error

type GaugeValue

type GaugeValue struct {
	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
}

GaugeValue wraps the value of a gauge

func (*GaugeValue) Descriptor

func (*GaugeValue) Descriptor() ([]byte, []int)

func (*GaugeValue) GetValue

func (m *GaugeValue) GetValue() float64

func (*GaugeValue) Marshal

func (m *GaugeValue) Marshal() (dAtA []byte, err error)

func (*GaugeValue) MarshalTo

func (m *GaugeValue) MarshalTo(dAtA []byte) (int, error)

func (*GaugeValue) ProtoMessage

func (*GaugeValue) ProtoMessage()

func (*GaugeValue) Reset

func (m *GaugeValue) Reset()

func (*GaugeValue) Size

func (m *GaugeValue) Size() (n int)

func (*GaugeValue) String

func (m *GaugeValue) String() string

func (*GaugeValue) Unmarshal

func (m *GaugeValue) Unmarshal(dAtA []byte) error

func (*GaugeValue) XXX_DiscardUnknown

func (m *GaugeValue) XXX_DiscardUnknown()

func (*GaugeValue) XXX_Marshal

func (m *GaugeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GaugeValue) XXX_Merge

func (m *GaugeValue) XXX_Merge(src proto.Message)

func (*GaugeValue) XXX_Size

func (m *GaugeValue) XXX_Size() int

func (*GaugeValue) XXX_Unmarshal

func (m *GaugeValue) XXX_Unmarshal(b []byte) error

type HistogramValue

type HistogramValue struct {
	TDigest *tdigest.MergingDigestData `protobuf:"bytes,1,opt,name=t_digest,json=tDigest,proto3" json:"t_digest,omitempty"`
}

HistogramValue for now just includes the t-digest. This can be expanded to include the other values such as the sum, average, etc.

func (*HistogramValue) Descriptor

func (*HistogramValue) Descriptor() ([]byte, []int)

func (*HistogramValue) GetTDigest

func (m *HistogramValue) GetTDigest() *tdigest.MergingDigestData

func (*HistogramValue) Marshal

func (m *HistogramValue) Marshal() (dAtA []byte, err error)

func (*HistogramValue) MarshalTo

func (m *HistogramValue) MarshalTo(dAtA []byte) (int, error)

func (*HistogramValue) ProtoMessage

func (*HistogramValue) ProtoMessage()

func (*HistogramValue) Reset

func (m *HistogramValue) Reset()

func (*HistogramValue) Size

func (m *HistogramValue) Size() (n int)

func (*HistogramValue) String

func (m *HistogramValue) String() string

func (*HistogramValue) Unmarshal

func (m *HistogramValue) Unmarshal(dAtA []byte) error

func (*HistogramValue) XXX_DiscardUnknown

func (m *HistogramValue) XXX_DiscardUnknown()

func (*HistogramValue) XXX_Marshal

func (m *HistogramValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HistogramValue) XXX_Merge

func (m *HistogramValue) XXX_Merge(src proto.Message)

func (*HistogramValue) XXX_Size

func (m *HistogramValue) XXX_Size() int

func (*HistogramValue) XXX_Unmarshal

func (m *HistogramValue) XXX_Unmarshal(b []byte) error

type Metric

type Metric struct {
	Name string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
	Type Type     `protobuf:"varint,3,opt,name=type,proto3,enum=metricpb.Type" json:"type,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*Metric_Counter
	//	*Metric_Gauge
	//	*Metric_Histogram
	//	*Metric_Set
	Value isMetric_Value `protobuf_oneof:"value"`
	Scope Scope          `protobuf:"varint,9,opt,name=scope,proto3,enum=metricpb.Scope" json:"scope,omitempty"`
}

Metric is a common container for any metric type. Common fields such as Name, Tags, and Type are all present for all types, while the value can vary.

func (*Metric) Descriptor

func (*Metric) Descriptor() ([]byte, []int)

func (*Metric) GetCounter

func (m *Metric) GetCounter() *CounterValue

func (*Metric) GetGauge

func (m *Metric) GetGauge() *GaugeValue

func (*Metric) GetHistogram

func (m *Metric) GetHistogram() *HistogramValue

func (*Metric) GetName

func (m *Metric) GetName() string

func (*Metric) GetScope

func (m *Metric) GetScope() Scope

func (*Metric) GetSet

func (m *Metric) GetSet() *SetValue

func (*Metric) GetTags

func (m *Metric) GetTags() []string

func (*Metric) GetType

func (m *Metric) GetType() Type

func (*Metric) GetValue

func (m *Metric) GetValue() isMetric_Value

func (*Metric) Marshal

func (m *Metric) Marshal() (dAtA []byte, err error)

func (*Metric) MarshalTo

func (m *Metric) MarshalTo(dAtA []byte) (int, error)

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) Size

func (m *Metric) Size() (n int)

func (*Metric) String

func (m *Metric) String() string

func (*Metric) Unmarshal

func (m *Metric) Unmarshal(dAtA []byte) error

func (*Metric) XXX_DiscardUnknown

func (m *Metric) XXX_DiscardUnknown()

func (*Metric) XXX_Marshal

func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metric) XXX_Merge

func (m *Metric) XXX_Merge(src proto.Message)

func (*Metric) XXX_OneofFuncs

func (*Metric) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Metric) XXX_Size

func (m *Metric) XXX_Size() int

func (*Metric) XXX_Unmarshal

func (m *Metric) XXX_Unmarshal(b []byte) error

type Metric_Counter

type Metric_Counter struct {
	Counter *CounterValue `protobuf:"bytes,5,opt,name=counter,proto3,oneof"`
}

func (*Metric_Counter) MarshalTo

func (m *Metric_Counter) MarshalTo(dAtA []byte) (int, error)

func (*Metric_Counter) Size

func (m *Metric_Counter) Size() (n int)

type Metric_Gauge

type Metric_Gauge struct {
	Gauge *GaugeValue `protobuf:"bytes,6,opt,name=gauge,proto3,oneof"`
}

func (*Metric_Gauge) MarshalTo

func (m *Metric_Gauge) MarshalTo(dAtA []byte) (int, error)

func (*Metric_Gauge) Size

func (m *Metric_Gauge) Size() (n int)

type Metric_Histogram

type Metric_Histogram struct {
	Histogram *HistogramValue `protobuf:"bytes,7,opt,name=histogram,proto3,oneof"`
}

func (*Metric_Histogram) MarshalTo

func (m *Metric_Histogram) MarshalTo(dAtA []byte) (int, error)

func (*Metric_Histogram) Size

func (m *Metric_Histogram) Size() (n int)

type Metric_Set

type Metric_Set struct {
	Set *SetValue `protobuf:"bytes,8,opt,name=set,proto3,oneof"`
}

func (*Metric_Set) MarshalTo

func (m *Metric_Set) MarshalTo(dAtA []byte) (int, error)

func (*Metric_Set) Size

func (m *Metric_Set) Size() (n int)

type Scope

type Scope int32

Scope describes at which level the metric will be emitted.

const (
	Scope_Mixed  Scope = 0
	Scope_Local  Scope = 1
	Scope_Global Scope = 2
)

func (Scope) EnumDescriptor

func (Scope) EnumDescriptor() ([]byte, []int)

func (Scope) String

func (x Scope) String() string

type SetValue

type SetValue struct {
	HyperLogLog []byte `protobuf:"bytes,1,opt,name=hyper_log_log,json=hyperLogLog,proto3" json:"hyper_log_log,omitempty"`
}

SetValue contains a binary-encoded HyperLogLog

func (*SetValue) Descriptor

func (*SetValue) Descriptor() ([]byte, []int)

func (*SetValue) GetHyperLogLog

func (m *SetValue) GetHyperLogLog() []byte

func (*SetValue) Marshal

func (m *SetValue) Marshal() (dAtA []byte, err error)

func (*SetValue) MarshalTo

func (m *SetValue) MarshalTo(dAtA []byte) (int, error)

func (*SetValue) ProtoMessage

func (*SetValue) ProtoMessage()

func (*SetValue) Reset

func (m *SetValue) Reset()

func (*SetValue) Size

func (m *SetValue) Size() (n int)

func (*SetValue) String

func (m *SetValue) String() string

func (*SetValue) Unmarshal

func (m *SetValue) Unmarshal(dAtA []byte) error

func (*SetValue) XXX_DiscardUnknown

func (m *SetValue) XXX_DiscardUnknown()

func (*SetValue) XXX_Marshal

func (m *SetValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetValue) XXX_Merge

func (m *SetValue) XXX_Merge(src proto.Message)

func (*SetValue) XXX_Size

func (m *SetValue) XXX_Size() int

func (*SetValue) XXX_Unmarshal

func (m *SetValue) XXX_Unmarshal(b []byte) error

type Type

type Type int32

Type can be any of the valid metric types recognized by Veneur.

const (
	Type_Counter   Type = 0
	Type_Gauge     Type = 1
	Type_Histogram Type = 2
	Type_Set       Type = 3
	Type_Timer     Type = 4
)

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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