Documentation ¶
Index ¶
- Variables
- func CounterAgg(desc *export.Descriptor, v int64) export.Aggregator
- func GaugeAgg(desc *export.Descriptor, v int64) export.Aggregator
- func NewAggregationSelector() export.AggregationSelector
- func NewCounterRecord(desc *export.Descriptor, labels export.Labels, value int64) export.Record
- func NewGaugeRecord(desc *export.Descriptor, labels export.Labels, value int64) export.Record
- type Encoder
- type Output
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // GaugeADesc and GaugeBDesc group by "G" GaugeADesc = export.NewDescriptor( "gauge.a", export.GaugeKind, []core.Key{key.New("G")}, "", "", core.Int64NumberKind, false) GaugeBDesc = export.NewDescriptor( "gauge.b", export.GaugeKind, []core.Key{key.New("G")}, "", "", core.Int64NumberKind, false) // CounterADesc and CounterBDesc group by "C" CounterADesc = export.NewDescriptor( "counter.a", export.CounterKind, []core.Key{key.New("C")}, "", "", core.Int64NumberKind, false) CounterBDesc = export.NewDescriptor( "counter.b", export.CounterKind, []core.Key{key.New("C")}, "", "", core.Int64NumberKind, false) // SdkEncoder uses a non-standard encoder like K1~V1&K2~V2 SdkEncoder = &Encoder{} // GroupEncoder uses the SDK default encoder GroupEncoder = sdk.NewDefaultLabelEncoder() // Labels1 has G=H and C=D Labels1 = makeLabels(SdkEncoder, key.String("G", "H"), key.String("C", "D")) // Labels2 has C=D and E=F Labels2 = makeLabels(SdkEncoder, key.String("C", "D"), key.String("E", "F")) // Labels3 is the empty set Labels3 = makeLabels(SdkEncoder) )
Functions ¶
func CounterAgg ¶
func CounterAgg(desc *export.Descriptor, v int64) export.Aggregator
CounterAgg returns a checkpointed counter aggregator w/ the specified descriptor and value.
func GaugeAgg ¶
func GaugeAgg(desc *export.Descriptor, v int64) export.Aggregator
GaugeAgg returns a checkpointed gauge aggregator w/ the specified descriptor and value.
func NewAggregationSelector ¶
func NewAggregationSelector() export.AggregationSelector
NewAggregationSelector returns a policy that is consistent with the test descriptors above. I.e., it returns counter.New() for counter instruments and gauge.New for gauge instruments.
func NewCounterRecord ¶ added in v0.2.0
Convenience method for building a test exported counter record.
func NewGaugeRecord ¶ added in v0.2.0
Convenience method for building a test exported gauge record.
Types ¶
Click to show internal directories.
Click to hide internal directories.