Documentation
¶
Index ¶
- Variables
- type CompoundField
- func (*CompoundField) Descriptor() ([]byte, []int)
- func (m *CompoundField) GetCount() float64
- func (m *CompoundField) GetExemplars() []*Exemplar
- func (m *CompoundField) GetExplicitBounds() []float64
- func (m *CompoundField) GetMax() float64
- func (m *CompoundField) GetMin() float64
- func (m *CompoundField) GetSum() float64
- func (m *CompoundField) GetValues() []float64
- func (m *CompoundField) Marshal() (dAtA []byte, err error)
- func (m *CompoundField) MarshalTo(dAtA []byte) (int, error)
- func (m *CompoundField) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CompoundField) ProtoMessage()
- func (m *CompoundField) Reset()
- func (m *CompoundField) Size() (n int)
- func (m *CompoundField) String() string
- func (m *CompoundField) Unmarshal(dAtA []byte) error
- func (m *CompoundField) XXX_DiscardUnknown()
- func (m *CompoundField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CompoundField) XXX_Merge(src proto.Message)
- func (m *CompoundField) XXX_Size() int
- func (m *CompoundField) XXX_Unmarshal(b []byte) error
- type Exemplar
- func (*Exemplar) Descriptor() ([]byte, []int)
- func (m *Exemplar) GetDuration() int64
- func (m *Exemplar) GetSpanId() []byte
- func (m *Exemplar) GetTraceId() []byte
- func (m *Exemplar) Marshal() (dAtA []byte, err error)
- func (m *Exemplar) MarshalTo(dAtA []byte) (int, error)
- func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Exemplar) ProtoMessage()
- func (m *Exemplar) Reset()
- func (m *Exemplar) Size() (n int)
- func (m *Exemplar) String() string
- func (m *Exemplar) Unmarshal(dAtA []byte) error
- func (m *Exemplar) XXX_DiscardUnknown()
- func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Exemplar) XXX_Merge(src proto.Message)
- func (m *Exemplar) XXX_Size() int
- func (m *Exemplar) XXX_Unmarshal(b []byte) error
- type KeyValue
- func (*KeyValue) Descriptor() ([]byte, []int)
- func (m *KeyValue) GetKey() string
- func (m *KeyValue) GetValue() string
- func (m *KeyValue) Marshal() (dAtA []byte, err error)
- func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)
- func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KeyValue) ProtoMessage()
- func (m *KeyValue) Reset()
- func (m *KeyValue) Size() (n int)
- func (m *KeyValue) String() string
- func (m *KeyValue) Unmarshal(dAtA []byte) error
- func (m *KeyValue) XXX_DiscardUnknown()
- func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KeyValue) XXX_Merge(src proto.Message)
- func (m *KeyValue) XXX_Size() int
- func (m *KeyValue) XXX_Unmarshal(b []byte) error
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)
- func (m *Metric) GetCompoundField() *CompoundField
- func (m *Metric) GetName() string
- func (m *Metric) GetNamespace() string
- func (m *Metric) GetSimpleFields() []*SimpleField
- func (m *Metric) GetTags() []*KeyValue
- func (m *Metric) GetTagsHash() uint64
- func (m *Metric) GetTimestamp() int64
- func (m *Metric) Marshal() (dAtA []byte, err error)
- func (m *Metric) MarshalTo(dAtA []byte) (int, error)
- func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Metric) ProtoMessage()
- func (m *Metric) Reset()
- func (m *Metric) Size() (n int)
- func (m *Metric) String() string
- func (m *Metric) Unmarshal(dAtA []byte) error
- func (m *Metric) XXX_DiscardUnknown()
- func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metric) XXX_Merge(src proto.Message)
- func (m *Metric) XXX_Size() int
- func (m *Metric) XXX_Unmarshal(b []byte) error
- type MetricList
- func (*MetricList) Descriptor() ([]byte, []int)
- func (m *MetricList) GetMetrics() []*Metric
- func (m *MetricList) Marshal() (dAtA []byte, err error)
- func (m *MetricList) MarshalTo(dAtA []byte) (int, error)
- func (m *MetricList) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MetricList) ProtoMessage()
- func (m *MetricList) Reset()
- func (m *MetricList) Size() (n int)
- func (m *MetricList) String() string
- func (m *MetricList) Unmarshal(dAtA []byte) error
- func (m *MetricList) XXX_DiscardUnknown()
- func (m *MetricList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricList) XXX_Merge(src proto.Message)
- func (m *MetricList) XXX_Size() int
- func (m *MetricList) XXX_Unmarshal(b []byte) error
- type SimpleField
- func (*SimpleField) Descriptor() ([]byte, []int)
- func (m *SimpleField) GetExemplars() []*Exemplar
- func (m *SimpleField) GetName() string
- func (m *SimpleField) GetType() SimpleFieldType
- func (m *SimpleField) GetValue() float64
- func (m *SimpleField) Marshal() (dAtA []byte, err error)
- func (m *SimpleField) MarshalTo(dAtA []byte) (int, error)
- func (m *SimpleField) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SimpleField) ProtoMessage()
- func (m *SimpleField) Reset()
- func (m *SimpleField) Size() (n int)
- func (m *SimpleField) String() string
- func (m *SimpleField) Unmarshal(dAtA []byte) error
- func (m *SimpleField) XXX_DiscardUnknown()
- func (m *SimpleField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SimpleField) XXX_Merge(src proto.Message)
- func (m *SimpleField) XXX_Size() int
- func (m *SimpleField) XXX_Unmarshal(b []byte) error
- type SimpleFieldType
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthLinmetrics = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLinmetrics = fmt.Errorf("proto: integer overflow") )
var SimpleFieldType_name = map[int32]string{
0: "SIMPLE_UNSPECIFIED",
1: "LAST",
2: "DELTA_SUM",
3: "Min",
4: "Max",
5: "FIRST",
}
var SimpleFieldType_value = map[string]int32{
"SIMPLE_UNSPECIFIED": 0,
"LAST": 1,
"DELTA_SUM": 2,
"Min": 3,
"Max": 4,
"FIRST": 5,
}
Functions ¶
This section is empty.
Types ¶
type CompoundField ¶
type CompoundField struct { Exemplars []*Exemplar `protobuf:"bytes,1,rep,name=exemplars,proto3" json:"exemplars,omitempty"` Min float64 `protobuf:"fixed64,2,opt,name=min,proto3" json:"min,omitempty"` Max float64 `protobuf:"fixed64,3,opt,name=max,proto3" json:"max,omitempty"` Sum float64 `protobuf:"fixed64,4,opt,name=sum,proto3" json:"sum,omitempty"` Count float64 `protobuf:"fixed64,5,opt,name=count,proto3" json:"count,omitempty"` // same as open-telemetry metrics definition // explicit_bounds specifies buckets with explicitly defined bounds for values. // // The boundaries for bucket at index i are: // // (-infinity, explicit_bounds[i]] for i == 0 // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) // // The values in the explicit_bounds array must be strictly increasing. // // Histogram buckets are inclusive of their upper boundary, except the last // bucket where the boundary is at infinity. This format is intentionally // compatible with the OpenMetrics histogram definition. ExplicitBounds []float64 `protobuf:"fixed64,6,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` Values []float64 `protobuf:"fixed64,7,rep,packed,name=values,proto3" json:"values,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CompoundData is compound data used for histogram field.
func (*CompoundField) Descriptor ¶
func (*CompoundField) Descriptor() ([]byte, []int)
func (*CompoundField) GetCount ¶
func (m *CompoundField) GetCount() float64
func (*CompoundField) GetExemplars ¶
func (m *CompoundField) GetExemplars() []*Exemplar
func (*CompoundField) GetExplicitBounds ¶
func (m *CompoundField) GetExplicitBounds() []float64
func (*CompoundField) GetMax ¶
func (m *CompoundField) GetMax() float64
func (*CompoundField) GetMin ¶
func (m *CompoundField) GetMin() float64
func (*CompoundField) GetSum ¶
func (m *CompoundField) GetSum() float64
func (*CompoundField) GetValues ¶
func (m *CompoundField) GetValues() []float64
func (*CompoundField) Marshal ¶
func (m *CompoundField) Marshal() (dAtA []byte, err error)
func (*CompoundField) MarshalToSizedBuffer ¶
func (m *CompoundField) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CompoundField) ProtoMessage ¶
func (*CompoundField) ProtoMessage()
func (*CompoundField) Reset ¶
func (m *CompoundField) Reset()
func (*CompoundField) Size ¶
func (m *CompoundField) Size() (n int)
func (*CompoundField) String ¶
func (m *CompoundField) String() string
func (*CompoundField) Unmarshal ¶
func (m *CompoundField) Unmarshal(dAtA []byte) error
func (*CompoundField) XXX_DiscardUnknown ¶
func (m *CompoundField) XXX_DiscardUnknown()
func (*CompoundField) XXX_Marshal ¶
func (m *CompoundField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CompoundField) XXX_Merge ¶
func (m *CompoundField) XXX_Merge(src proto.Message)
func (*CompoundField) XXX_Size ¶
func (m *CompoundField) XXX_Size() int
func (*CompoundField) XXX_Unmarshal ¶
func (m *CompoundField) XXX_Unmarshal(b []byte) error
type Exemplar ¶
type Exemplar struct { // Span ID of the exemplar trace. SpanId []byte `protobuf:"bytes,1,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` // Trace ID of the exemplar trace. TraceId []byte `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // Duration of the exemplar span. Duration int64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A representation of an exemplar, which is a sample input compound-field. Exemplars in LindDB wont' hold any information about the environment it is used to record span and trace ID for a specify series.
func (*Exemplar) Descriptor ¶
func (*Exemplar) GetDuration ¶
func (*Exemplar) GetTraceId ¶
func (*Exemplar) MarshalToSizedBuffer ¶
func (*Exemplar) ProtoMessage ¶
func (*Exemplar) ProtoMessage()
func (*Exemplar) XXX_DiscardUnknown ¶
func (m *Exemplar) XXX_DiscardUnknown()
func (*Exemplar) XXX_Marshal ¶
func (*Exemplar) XXX_Unmarshal ¶
type KeyValue ¶
type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
KeyValue is a key-value pair that is used to store tag/label attributes
func (*KeyValue) Descriptor ¶
func (*KeyValue) MarshalToSizedBuffer ¶
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) XXX_DiscardUnknown ¶
func (m *KeyValue) XXX_DiscardUnknown()
func (*KeyValue) XXX_Marshal ¶
func (*KeyValue) XXX_Unmarshal ¶
type Metric ¶
type Metric struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Tags []*KeyValue `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` // xxhash.Sum64String(tags), broker side generate before write wal TagsHash uint64 `protobuf:"varint,5,opt,name=tags_hash,json=tagsHash,proto3" json:"tags_hash,omitempty"` SimpleFields []*SimpleField `protobuf:"bytes,6,rep,name=simple_fields,json=simpleFields,proto3" json:"simple_fields,omitempty"` CompoundField *CompoundField `protobuf:"bytes,7,opt,name=compound_field,json=compoundField,proto3" json:"compound_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Defines a Metric which has one or more time series. The following is a brief summary of the Metric data model. For more details, see:
https://lindb.io/zh/docs/concept/datamodel.html
Here, "Field" is the term used to refer any specific field with exemplars. and "Data" is the term used to refer to the specific underlying value for the field.
- Metric is composed of metadata、timestamp and fields. - Metadata part contains a namespace, name, tags and its sorted-concat-string hash. - Fields is the array of the possible fields (Sum, Last, Histogram). - Fields contains exemplars, names, and the underlying value or value list
Metric +---------------+ |namespace | |name | |tags | |tags-hash | |timestamp | +------------------------------------+ |simple-fields |---> |Last, Sum, ... | |compound-field |---> |Histogram | +---------------+ +------------------------------------+ SimpleField [One of Last, DeltaSum, Min, Max ...] +-----------+ |name | // field-name |type | // field-type |exemplars | // exemplars of series +-----------+ |value | +-----------+ CompoundField [DeltaHistogram ...] +-----------+ |exemplars | // exemplars of series +-----+-----+-----+-----+-----+-----+ |min |max |sum |value|value|.....| +-----+-----+-----+-----+-----+-----+
func (*Metric) Descriptor ¶
func (*Metric) GetCompoundField ¶
func (m *Metric) GetCompoundField() *CompoundField
func (*Metric) GetNamespace ¶
func (*Metric) GetSimpleFields ¶
func (m *Metric) GetSimpleFields() []*SimpleField
func (*Metric) GetTagsHash ¶
func (*Metric) GetTimestamp ¶
func (*Metric) MarshalToSizedBuffer ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) XXX_DiscardUnknown ¶
func (m *Metric) XXX_DiscardUnknown()
func (*Metric) XXX_Marshal ¶
func (*Metric) XXX_Unmarshal ¶
type MetricList ¶
type MetricList struct { Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetricList) Descriptor ¶
func (*MetricList) Descriptor() ([]byte, []int)
func (*MetricList) GetMetrics ¶
func (m *MetricList) GetMetrics() []*Metric
func (*MetricList) Marshal ¶
func (m *MetricList) Marshal() (dAtA []byte, err error)
func (*MetricList) MarshalToSizedBuffer ¶
func (m *MetricList) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MetricList) ProtoMessage ¶
func (*MetricList) ProtoMessage()
func (*MetricList) Reset ¶
func (m *MetricList) Reset()
func (*MetricList) Size ¶
func (m *MetricList) Size() (n int)
func (*MetricList) String ¶
func (m *MetricList) String() string
func (*MetricList) Unmarshal ¶
func (m *MetricList) Unmarshal(dAtA []byte) error
func (*MetricList) XXX_DiscardUnknown ¶
func (m *MetricList) XXX_DiscardUnknown()
func (*MetricList) XXX_Marshal ¶
func (m *MetricList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetricList) XXX_Merge ¶
func (m *MetricList) XXX_Merge(src proto.Message)
func (*MetricList) XXX_Size ¶
func (m *MetricList) XXX_Size() int
func (*MetricList) XXX_Unmarshal ¶
func (m *MetricList) XXX_Unmarshal(b []byte) error
type SimpleField ¶
type SimpleField struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type SimpleFieldType `protobuf:"varint,2,opt,name=type,proto3,enum=protoMetricsV1.SimpleFieldType" json:"type,omitempty"` Exemplars []*Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars,omitempty"` Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SimpleField) Descriptor ¶
func (*SimpleField) Descriptor() ([]byte, []int)
func (*SimpleField) GetExemplars ¶
func (m *SimpleField) GetExemplars() []*Exemplar
func (*SimpleField) GetName ¶
func (m *SimpleField) GetName() string
func (*SimpleField) GetType ¶
func (m *SimpleField) GetType() SimpleFieldType
func (*SimpleField) GetValue ¶
func (m *SimpleField) GetValue() float64
func (*SimpleField) Marshal ¶
func (m *SimpleField) Marshal() (dAtA []byte, err error)
func (*SimpleField) MarshalToSizedBuffer ¶
func (m *SimpleField) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SimpleField) ProtoMessage ¶
func (*SimpleField) ProtoMessage()
func (*SimpleField) Reset ¶
func (m *SimpleField) Reset()
func (*SimpleField) Size ¶
func (m *SimpleField) Size() (n int)
func (*SimpleField) String ¶
func (m *SimpleField) String() string
func (*SimpleField) Unmarshal ¶
func (m *SimpleField) Unmarshal(dAtA []byte) error
func (*SimpleField) XXX_DiscardUnknown ¶
func (m *SimpleField) XXX_DiscardUnknown()
func (*SimpleField) XXX_Marshal ¶
func (m *SimpleField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SimpleField) XXX_Merge ¶
func (m *SimpleField) XXX_Merge(src proto.Message)
func (*SimpleField) XXX_Size ¶
func (m *SimpleField) XXX_Size() int
func (*SimpleField) XXX_Unmarshal ¶
func (m *SimpleField) XXX_Unmarshal(b []byte) error
type SimpleFieldType ¶
type SimpleFieldType int32
const ( SimpleFieldType_SIMPLE_UNSPECIFIED SimpleFieldType = 0 SimpleFieldType_LAST SimpleFieldType = 1 SimpleFieldType_DELTA_SUM SimpleFieldType = 2 SimpleFieldType_Min SimpleFieldType = 3 SimpleFieldType_Max SimpleFieldType = 4 SimpleFieldType_FIRST SimpleFieldType = 5 )
func (SimpleFieldType) EnumDescriptor ¶
func (SimpleFieldType) EnumDescriptor() ([]byte, []int)
func (SimpleFieldType) String ¶
func (x SimpleFieldType) String() string