From a616711c111fb21d27a5fbcfbe0276cde445a2a2 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Mon, 28 Feb 2022 12:59:46 -0800 Subject: [PATCH 1/4] use sed to translate optional -> oneof --- Makefile | 2 +- .../data/protogen/metrics/v1/metrics.pb.go | 495 ++++++++++++++---- proto_patch.sed | 5 +- 3 files changed, 410 insertions(+), 92 deletions(-) diff --git a/Makefile b/Makefile index 19bc35672f8..34d1d3c460a 100644 --- a/Makefile +++ b/Makefile @@ -230,7 +230,7 @@ gendependabot: $(eval SHELL:=/bin/bash) OPENTELEMETRY_PROTO_SRC_DIR=model/internal/opentelemetry-proto # The SHA matching the current version of the proto to use -OPENTELEMETRY_PROTO_VERSION=v0.12.0 +OPENTELEMETRY_PROTO_VERSION=6f6a18c6b9522672bc0cbbe70a3d973f9a08ef2b # Find all .proto files. OPENTELEMETRY_PROTO_FILES := $(subst $(OPENTELEMETRY_PROTO_SRC_DIR)/,,$(wildcard $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1/*.proto)) diff --git a/model/internal/data/protogen/metrics/v1/metrics.pb.go b/model/internal/data/protogen/metrics/v1/metrics.pb.go index 55d65dc32ad..236cd8e4fcf 100644 --- a/model/internal/data/protogen/metrics/v1/metrics.pb.go +++ b/model/internal/data/protogen/metrics/v1/metrics.pb.go @@ -1079,6 +1079,16 @@ type HistogramDataPoint struct { // Flags that apply to this specific data point. See DataPointFlags // for the available flags and their meaning. Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` + // min is the minimum value over (start_time, end_time]. + // + // Types that are valid to be assigned to Min_: + // *HistogramDataPoint_Min + Min_ isHistogramDataPoint_Min_ `protobuf_oneof:"min_"` + // max is the maximum value over (start_time, end_time]. + // + // Types that are valid to be assigned to Max_: + // *HistogramDataPoint_Max + Max_ isHistogramDataPoint_Max_ `protobuf_oneof:"max_"` } func (m *HistogramDataPoint) Reset() { *m = HistogramDataPoint{} } @@ -1114,6 +1124,40 @@ func (m *HistogramDataPoint) XXX_DiscardUnknown() { var xxx_messageInfo_HistogramDataPoint proto.InternalMessageInfo +type isHistogramDataPoint_Min_ interface { + isHistogramDataPoint_Min_() + MarshalTo([]byte) (int, error) + Size() int +} +type isHistogramDataPoint_Max_ interface { + isHistogramDataPoint_Max_() + MarshalTo([]byte) (int, error) + Size() int +} + +type HistogramDataPoint_Min struct { + Min float64 `protobuf:"fixed64,11,opt,name=min,proto3,oneof" json:"min,omitempty"` +} +type HistogramDataPoint_Max struct { + Max float64 `protobuf:"fixed64,12,opt,name=max,proto3,oneof" json:"max,omitempty"` +} + +func (*HistogramDataPoint_Min) isHistogramDataPoint_Min_() {} +func (*HistogramDataPoint_Max) isHistogramDataPoint_Max_() {} + +func (m *HistogramDataPoint) GetMin_() isHistogramDataPoint_Min_ { + if m != nil { + return m.Min_ + } + return nil +} +func (m *HistogramDataPoint) GetMax_() isHistogramDataPoint_Max_ { + if m != nil { + return m.Max_ + } + return nil +} + func (m *HistogramDataPoint) GetAttributes() []v11.KeyValue { if m != nil { return m.Attributes @@ -1177,6 +1221,28 @@ func (m *HistogramDataPoint) GetFlags() uint32 { return 0 } +func (m *HistogramDataPoint) GetMin() float64 { + if x, ok := m.GetMin_().(*HistogramDataPoint_Min); ok { + return x.Min + } + return 0 +} + +func (m *HistogramDataPoint) GetMax() float64 { + if x, ok := m.GetMax_().(*HistogramDataPoint_Max); ok { + return x.Max + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HistogramDataPoint) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HistogramDataPoint_Min)(nil), + (*HistogramDataPoint_Max)(nil), + } +} + // ExponentialHistogramDataPoint is a single data point in a timeseries that describes the // time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains // summary statistics for a population of values, it may optionally contain the @@ -1245,6 +1311,16 @@ type ExponentialHistogramDataPoint struct { // (Optional) List of exemplars collected from // measurements that were used to form the data point Exemplars []Exemplar `protobuf:"bytes,11,rep,name=exemplars,proto3" json:"exemplars"` + // min is the minimum value over (start_time, end_time]. + // + // Types that are valid to be assigned to Min_: + // *ExponentialHistogramDataPoint_Min + Min_ isExponentialHistogramDataPoint_Min_ `protobuf_oneof:"min_"` + // max is the maximum value over (start_time, end_time]. + // + // Types that are valid to be assigned to Max_: + // *ExponentialHistogramDataPoint_Max + Max_ isExponentialHistogramDataPoint_Max_ `protobuf_oneof:"max_"` } func (m *ExponentialHistogramDataPoint) Reset() { *m = ExponentialHistogramDataPoint{} } @@ -1280,6 +1356,40 @@ func (m *ExponentialHistogramDataPoint) XXX_DiscardUnknown() { var xxx_messageInfo_ExponentialHistogramDataPoint proto.InternalMessageInfo +type isExponentialHistogramDataPoint_Min_ interface { + isExponentialHistogramDataPoint_Min_() + MarshalTo([]byte) (int, error) + Size() int +} +type isExponentialHistogramDataPoint_Max_ interface { + isExponentialHistogramDataPoint_Max_() + MarshalTo([]byte) (int, error) + Size() int +} + +type ExponentialHistogramDataPoint_Min struct { + Min float64 `protobuf:"fixed64,12,opt,name=min,proto3,oneof" json:"min,omitempty"` +} +type ExponentialHistogramDataPoint_Max struct { + Max float64 `protobuf:"fixed64,13,opt,name=max,proto3,oneof" json:"max,omitempty"` +} + +func (*ExponentialHistogramDataPoint_Min) isExponentialHistogramDataPoint_Min_() {} +func (*ExponentialHistogramDataPoint_Max) isExponentialHistogramDataPoint_Max_() {} + +func (m *ExponentialHistogramDataPoint) GetMin_() isExponentialHistogramDataPoint_Min_ { + if m != nil { + return m.Min_ + } + return nil +} +func (m *ExponentialHistogramDataPoint) GetMax_() isExponentialHistogramDataPoint_Max_ { + if m != nil { + return m.Max_ + } + return nil +} + func (m *ExponentialHistogramDataPoint) GetAttributes() []v11.KeyValue { if m != nil { return m.Attributes @@ -1357,6 +1467,28 @@ func (m *ExponentialHistogramDataPoint) GetExemplars() []Exemplar { return nil } +func (m *ExponentialHistogramDataPoint) GetMin() float64 { + if x, ok := m.GetMin_().(*ExponentialHistogramDataPoint_Min); ok { + return x.Min + } + return 0 +} + +func (m *ExponentialHistogramDataPoint) GetMax() float64 { + if x, ok := m.GetMax_().(*ExponentialHistogramDataPoint_Max); ok { + return x.Max + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ExponentialHistogramDataPoint) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ExponentialHistogramDataPoint_Min)(nil), + (*ExponentialHistogramDataPoint_Max)(nil), + } +} + // Buckets are a set of bucket counts, encoded in a contiguous array // of counts. type ExponentialHistogramDataPoint_Buckets struct { @@ -1756,96 +1888,99 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 1419 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x13, 0x47, - 0x14, 0xf7, 0xc6, 0xdf, 0xcf, 0x21, 0x31, 0xd3, 0x34, 0x58, 0x91, 0x12, 0x8c, 0x69, 0x49, 0x8a, - 0x2a, 0xbb, 0xa4, 0xdf, 0xaa, 0x90, 0xb0, 0x63, 0x27, 0x71, 0xc8, 0x17, 0x13, 0x07, 0x09, 0x84, - 0x58, 0x4d, 0xec, 0x89, 0x19, 0xb1, 0x3b, 0xe3, 0xee, 0xce, 0x46, 0x49, 0xef, 0xdc, 0x7a, 0x40, - 0x3d, 0xf6, 0xd4, 0x3f, 0xa0, 0x7f, 0x08, 0x47, 0x7a, 0xab, 0x7a, 0x40, 0x6d, 0x38, 0xf4, 0xd0, - 0x7b, 0xcf, 0xd5, 0xcc, 0xee, 0xc6, 0x1f, 0x38, 0x71, 0x28, 0x1c, 0xe0, 0x36, 0xfb, 0xe6, 0xbd, - 0xdf, 0xfb, 0xfa, 0xcd, 0x9b, 0xd1, 0xc2, 0xa7, 0xa2, 0x43, 0xb9, 0xa4, 0x16, 0xb5, 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8, 0x33, 0xb0, 0xad, 0x36, 0xb6, 0x8d, 0xfb, 0xb5, 0xd7, 0x2e, 0xb6, - 0xff, 0x27, 0xa8, 0x4d, 0x79, 0xcf, 0xcf, 0xa9, 0xbd, 0x84, 0x16, 0x7e, 0xfe, 0x5f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x8f, 0xa0, 0xf8, 0x24, 0xc5, 0x12, 0x00, 0x00, + // 1460 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6f, 0x1b, 0xb7, + 0x16, 0xd6, 0x58, 0xef, 0x23, 0x3f, 0x14, 0x5e, 0x5f, 0x47, 0x30, 0x60, 0x47, 0x51, 0xee, 0x8d, + 0xdd, 0xa0, 0x90, 0x1a, 0xf7, 0x8d, 0x22, 0x40, 0x24, 0x4b, 0xb6, 0xe5, 0xf8, 0x15, 0x5a, 0x0e, + 0x90, 0x20, 0xc8, 0x80, 0x96, 0x68, 0x85, 0xc8, 0x0c, 0xa9, 0xce, 0x70, 0x0c, 0xbb, 0xfb, 0xec, + 0xba, 0x08, 0xfa, 0x3b, 0xfa, 0x43, 0xb2, 0x4c, 0xbb, 0x0a, 0xba, 0x08, 0x5a, 0x67, 0xd1, 0x45, + 0xf7, 0x5d, 0x17, 0xe4, 0xcc, 0x58, 0x8f, 0xc8, 0x96, 0xd3, 0x64, 0x91, 0xac, 0x86, 0x3c, 0x3c, + 0xe7, 0xe3, 0x79, 0x7c, 0xe4, 0x21, 0x06, 0x3e, 0x15, 0x1d, 0xca, 0x25, 0xb5, 0xa8, 0x4d, 0xa5, + 0x73, 0x5c, 0xea, 0x38, 0x42, 0x8a, 0x92, 0x1a, 0xb3, 0xa6, 0x5b, 0x3a, 0xbc, 0x19, 0x0e, 0x8b, + 0x7a, 0x01, 0xcd, 0xf7, 0x69, 0xfb, 0xc2, 0x62, 0xa8, 0x72, 0x78, 0x73, 0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8f, 0xc0, 0x55, 0x26, 0x46, 0x1c, 0x97, 0xca, 0x78, 0xf0, 0x27, 0x62, + 0x47, 0x2d, 0xec, 0x18, 0x0f, 0x6a, 0x6f, 0x9d, 0x6c, 0xff, 0xcf, 0x53, 0x9b, 0xf2, 0x9e, 0x9f, + 0x61, 0xfb, 0x09, 0x2d, 0xfc, 0xfc, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x4f, 0x43, 0xf7, + 0x35, 0x13, 0x00, 0x00, } func (m *MetricsData) Marshal() (dAtA []byte, err error) { @@ -2484,6 +2619,24 @@ func (m *HistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Max_ != nil { + { + size := m.Max_.Size() + i -= size + if _, err := m.Max_.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.Min_ != nil { + { + size := m.Min_.Size() + i -= size + if _, err := m.Min_.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } if m.Flags != 0 { i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) i-- @@ -2563,6 +2716,32 @@ func (m *HistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *HistogramDataPoint_Min) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistogramDataPoint_Min) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) + i-- + dAtA[i] = 0x59 + return len(dAtA) - i, nil +} +func (m *HistogramDataPoint_Max) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistogramDataPoint_Max) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) + i-- + dAtA[i] = 0x61 + return len(dAtA) - i, nil +} func (m *ExponentialHistogramDataPoint) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2583,6 +2762,24 @@ func (m *ExponentialHistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.Max_ != nil { + { + size := m.Max_.Size() + i -= size + if _, err := m.Max_.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.Min_ != nil { + { + size := m.Min_.Size() + i -= size + if _, err := m.Min_.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } if len(m.Exemplars) > 0 { for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { { @@ -2674,6 +2871,32 @@ func (m *ExponentialHistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *ExponentialHistogramDataPoint_Min) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExponentialHistogramDataPoint_Min) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) + i-- + dAtA[i] = 0x61 + return len(dAtA) - i, nil +} +func (m *ExponentialHistogramDataPoint_Max) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExponentialHistogramDataPoint_Max) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) + i-- + dAtA[i] = 0x69 + return len(dAtA) - i, nil +} func (m *ExponentialHistogramDataPoint_Buckets) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3262,9 +3485,33 @@ func (m *HistogramDataPoint) Size() (n int) { if m.Flags != 0 { n += 1 + sovMetrics(uint64(m.Flags)) } + if m.Min_ != nil { + n += m.Min_.Size() + } + if m.Max_ != nil { + n += m.Max_.Size() + } return n } +func (m *HistogramDataPoint_Min) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *HistogramDataPoint_Max) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} func (m *ExponentialHistogramDataPoint) Size() (n int) { if m == nil { return 0 @@ -3308,9 +3555,33 @@ func (m *ExponentialHistogramDataPoint) Size() (n int) { n += 1 + l + sovMetrics(uint64(l)) } } + if m.Min_ != nil { + n += m.Min_.Size() + } + if m.Max_ != nil { + n += m.Max_.Size() + } return n } +func (m *ExponentialHistogramDataPoint_Min) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *ExponentialHistogramDataPoint_Max) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} func (m *ExponentialHistogramDataPoint_Buckets) Size() (n int) { if m == nil { return 0 @@ -5073,6 +5344,28 @@ func (m *HistogramDataPoint) Unmarshal(dAtA []byte) error { break } } + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Min_ = &HistogramDataPoint_Min{float64(math.Float64frombits(v))} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Max_ = &HistogramDataPoint_Max{float64(math.Float64frombits(v))} default: iNdEx = preIndex skippy, err := skipMetrics(dAtA[iNdEx:]) @@ -5348,6 +5641,28 @@ func (m *ExponentialHistogramDataPoint) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Min_ = &ExponentialHistogramDataPoint_Min{float64(math.Float64frombits(v))} + case 13: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Max_ = &ExponentialHistogramDataPoint_Max{float64(math.Float64frombits(v))} default: iNdEx = preIndex skippy, err := skipMetrics(dAtA[iNdEx:]) diff --git a/proto_patch.sed b/proto_patch.sed index 9758580f9c8..5033fb16c30 100644 --- a/proto_patch.sed +++ b/proto_patch.sed @@ -50,4 +50,7 @@ s+repeated Exemplar exemplars = \(.*\);+repeated Exemplar exemplars = \1\ [ (gogoproto.nullable) = false ];+g s+Buckets \(.*\)tive = \(.*\);+Buckets \1tive = \2\ - [ (gogoproto.nullable) = false ];+g \ No newline at end of file + [ (gogoproto.nullable) = false ];+g + +# optional fixed64 foo = 1 -> oneof foo_ { fixed64 foo = 1;} +s+optional \(.*\) \(.*\) = \(.*\);+ oneof \2_ { \1 \2 = \3;}+g From e4957d8628b47e57460808b7c8a27db0cba2546c Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Mon, 28 Feb 2022 15:50:33 -0800 Subject: [PATCH 2/4] add pdata for OptionalType This supports adding min/max optional fields. --- .../cmd/pdatagen/internal/metrics_structs.go | 32 +++++++++++ model/pdata/generated_metrics.go | 54 +++++++++++++++++++ model/pdata/generated_metrics_test.go | 34 ++++++++++++ model/pdata/metrics.go | 19 +++++++ 4 files changed, 139 insertions(+) diff --git a/model/internal/cmd/pdatagen/internal/metrics_structs.go b/model/internal/cmd/pdatagen/internal/metrics_structs.go index 6d91ed17407..13058d73694 100644 --- a/model/internal/cmd/pdatagen/internal/metrics_structs.go +++ b/model/internal/cmd/pdatagen/internal/metrics_structs.go @@ -289,6 +289,38 @@ var histogramDataPoint = &messageValueStruct{ explicitBoundsField, exemplarsField, dataPointFlagsField, + &oneOfField{ + typeName: "OptionalType", + originFieldName: "Min_", + originTypePrefix: "otlpmetrics.HistogramDataPoint_", + testValueIdx: 0, // Double + values: []oneOfValue{ + &oneOfPrimitiveValue{ + fieldName: "Min", + fieldType: "Double", + originFieldName: "Min", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(17.13)", + }, + }, + }, + &oneOfField{ + typeName: "OptionalType", + originFieldName: "Max_", + originTypePrefix: "otlpmetrics.HistogramDataPoint_", + testValueIdx: 0, // Double + values: []oneOfValue{ + &oneOfPrimitiveValue{ + fieldName: "Max", + fieldType: "Double", + originFieldName: "Max", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(17.13)", + }, + }, + }, }, } diff --git a/model/pdata/generated_metrics.go b/model/pdata/generated_metrics.go index 16eef86f412..b759e338e24 100644 --- a/model/pdata/generated_metrics.go +++ b/model/pdata/generated_metrics.go @@ -1438,6 +1438,50 @@ func (ms HistogramDataPoint) SetFlags(v MetricDataPointFlags) { (*ms.orig).Flags = uint32(v) } +// Min_Type returns the type of the min_ for this HistogramDataPoint. +// Calling this function on zero-initialized HistogramDataPoint will cause a panic. +func (ms HistogramDataPoint) Min_Type() OptionalType { + switch ms.orig.Min_.(type) { + case *otlpmetrics.HistogramDataPoint_Min: + return OptionalTypeDouble + } + return OptionalTypeNone +} + +// Min returns the min associated with this HistogramDataPoint. +func (ms HistogramDataPoint) Min() float64 { + return (*ms.orig).GetMin() +} + +// SetMin replaces the min associated with this HistogramDataPoint. +func (ms HistogramDataPoint) SetMin(v float64) { + (*ms.orig).Min_ = &otlpmetrics.HistogramDataPoint_Min{ + Min: v, + } +} + +// Max_Type returns the type of the max_ for this HistogramDataPoint. +// Calling this function on zero-initialized HistogramDataPoint will cause a panic. +func (ms HistogramDataPoint) Max_Type() OptionalType { + switch ms.orig.Max_.(type) { + case *otlpmetrics.HistogramDataPoint_Max: + return OptionalTypeDouble + } + return OptionalTypeNone +} + +// Max returns the max associated with this HistogramDataPoint. +func (ms HistogramDataPoint) Max() float64 { + return (*ms.orig).GetMax() +} + +// SetMax replaces the max associated with this HistogramDataPoint. +func (ms HistogramDataPoint) SetMax(v float64) { + (*ms.orig).Max_ = &otlpmetrics.HistogramDataPoint_Max{ + Max: v, + } +} + // CopyTo copies all properties from the current struct to the dest. func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint) { ms.Attributes().CopyTo(dest.Attributes()) @@ -1449,6 +1493,16 @@ func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint) { dest.SetExplicitBounds(ms.ExplicitBounds()) ms.Exemplars().CopyTo(dest.Exemplars()) dest.SetFlags(ms.Flags()) + switch ms.Min_Type() { + case OptionalTypeDouble: + dest.SetMin(ms.Min()) + } + + switch ms.Max_Type() { + case OptionalTypeDouble: + dest.SetMax(ms.Max()) + } + } // ExponentialHistogramDataPointSlice logically represents a slice of ExponentialHistogramDataPoint. diff --git a/model/pdata/generated_metrics_test.go b/model/pdata/generated_metrics_test.go index 10db30064a0..b4618370058 100644 --- a/model/pdata/generated_metrics_test.go +++ b/model/pdata/generated_metrics_test.go @@ -1094,6 +1094,38 @@ func TestHistogramDataPoint_Flags(t *testing.T) { assert.EqualValues(t, testValFlags, ms.Flags()) } +func TestHistogramDataPointMin_Type(t *testing.T) { + tv := NewHistogramDataPoint() + assert.Equal(t, OptionalTypeNone, tv.Min_Type()) + assert.Equal(t, "", OptionalType(1000).String()) + tv.SetMin(float64(17.13)) + assert.Equal(t, OptionalTypeDouble, tv.Min_Type()) +} + +func TestHistogramDataPoint_Min(t *testing.T) { + ms := NewHistogramDataPoint() + assert.EqualValues(t, float64(0.0), ms.Min()) + testValMin := float64(17.13) + ms.SetMin(testValMin) + assert.EqualValues(t, testValMin, ms.Min()) +} + +func TestHistogramDataPointMax_Type(t *testing.T) { + tv := NewHistogramDataPoint() + assert.Equal(t, OptionalTypeNone, tv.Max_Type()) + assert.Equal(t, "", OptionalType(1000).String()) + tv.SetMax(float64(17.13)) + assert.Equal(t, OptionalTypeDouble, tv.Max_Type()) +} + +func TestHistogramDataPoint_Max(t *testing.T) { + ms := NewHistogramDataPoint() + assert.EqualValues(t, float64(0.0), ms.Max()) + testValMax := float64(17.13) + ms.SetMax(testValMax) + assert.EqualValues(t, testValMax, ms.Max()) +} + func TestExponentialHistogramDataPointSlice(t *testing.T) { es := NewExponentialHistogramDataPointSlice() assert.EqualValues(t, 0, es.Len()) @@ -2018,6 +2050,8 @@ func fillTestHistogramDataPoint(tv HistogramDataPoint) { tv.SetExplicitBounds([]float64{1, 2, 3}) fillTestExemplarSlice(tv.Exemplars()) tv.SetFlags(MetricDataPointFlagsNone) + tv.SetMin(float64(17.13)) + tv.SetMax(float64(17.13)) } func generateTestExponentialHistogramDataPointSlice() ExponentialHistogramDataPointSlice { diff --git a/model/pdata/metrics.go b/model/pdata/metrics.go index 9d5c6188260..fda48c5a3c6 100644 --- a/model/pdata/metrics.go +++ b/model/pdata/metrics.go @@ -255,3 +255,22 @@ func (ms NumberDataPoint) Type() MetricValueType { func (ms Exemplar) Type() MetricValueType { return ms.ValueType() } + +// OptionalType wraps optional fields into oneof fields +type OptionalType int32 + +const ( + OptionalTypeNone OptionalType = iota + OptionalTypeDouble +) + +// String returns the string representation of the OptionalType. +func (ot OptionalType) String() string { + switch ot { + case OptionalTypeNone: + return "None" + case OptionalTypeDouble: + return "Double" + } + return "" +} From 53371f138bbd64c817521f4871dea7e3b1007d26 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Tue, 1 Mar 2022 15:31:13 -0800 Subject: [PATCH 3/4] add min/max to exponential histogram as well --- .../cmd/pdatagen/internal/metrics_structs.go | 54 ++++++++++++------- model/pdata/generated_metrics.go | 54 +++++++++++++++++++ model/pdata/generated_metrics_test.go | 34 ++++++++++++ 3 files changed, 122 insertions(+), 20 deletions(-) diff --git a/model/internal/cmd/pdatagen/internal/metrics_structs.go b/model/internal/cmd/pdatagen/internal/metrics_structs.go index 13058d73694..18382de9a5f 100644 --- a/model/internal/cmd/pdatagen/internal/metrics_structs.go +++ b/model/internal/cmd/pdatagen/internal/metrics_structs.go @@ -294,32 +294,14 @@ var histogramDataPoint = &messageValueStruct{ originFieldName: "Min_", originTypePrefix: "otlpmetrics.HistogramDataPoint_", testValueIdx: 0, // Double - values: []oneOfValue{ - &oneOfPrimitiveValue{ - fieldName: "Min", - fieldType: "Double", - originFieldName: "Min", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(17.13)", - }, - }, + values: []oneOfValue{minField}, }, &oneOfField{ typeName: "OptionalType", originFieldName: "Max_", originTypePrefix: "otlpmetrics.HistogramDataPoint_", testValueIdx: 0, // Double - values: []oneOfValue{ - &oneOfPrimitiveValue{ - fieldName: "Max", - fieldType: "Double", - originFieldName: "Max", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(17.13)", - }, - }, + values: []oneOfValue{maxField}, }, }, } @@ -370,6 +352,20 @@ var exponentialHistogramDataPoint = &messageValueStruct{ }, exemplarsField, dataPointFlagsField, + &oneOfField{ + typeName: "OptionalType", + originFieldName: "Min_", + originTypePrefix: "otlpmetrics.ExponentialHistogramDataPoint_", + testValueIdx: 0, // Double + values: []oneOfValue{minField}, + }, + &oneOfField{ + typeName: "OptionalType", + originFieldName: "Max_", + originTypePrefix: "otlpmetrics.ExponentialHistogramDataPoint_", + testValueIdx: 0, // Double + values: []oneOfValue{maxField}, + }, }, } @@ -556,3 +552,21 @@ var dataPointFlagsField = &primitiveTypedField{ defaultVal: "MetricDataPointFlagsNone", testVal: "MetricDataPointFlagsNone", } + +var minField = &oneOfPrimitiveValue{ + fieldName: "Min", + fieldType: "Double", + originFieldName: "Min", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(17.13)", +} + +var maxField = &oneOfPrimitiveValue{ + fieldName: "Max", + fieldType: "Double", + originFieldName: "Max", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(17.13)", +} diff --git a/model/pdata/generated_metrics.go b/model/pdata/generated_metrics.go index b759e338e24..bf7e75e73fe 100644 --- a/model/pdata/generated_metrics.go +++ b/model/pdata/generated_metrics.go @@ -1765,6 +1765,50 @@ func (ms ExponentialHistogramDataPoint) SetFlags(v MetricDataPointFlags) { (*ms.orig).Flags = uint32(v) } +// Min_Type returns the type of the min_ for this ExponentialHistogramDataPoint. +// Calling this function on zero-initialized ExponentialHistogramDataPoint will cause a panic. +func (ms ExponentialHistogramDataPoint) Min_Type() OptionalType { + switch ms.orig.Min_.(type) { + case *otlpmetrics.ExponentialHistogramDataPoint_Min: + return OptionalTypeDouble + } + return OptionalTypeNone +} + +// Min returns the min associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) Min() float64 { + return (*ms.orig).GetMin() +} + +// SetMin replaces the min associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) SetMin(v float64) { + (*ms.orig).Min_ = &otlpmetrics.ExponentialHistogramDataPoint_Min{ + Min: v, + } +} + +// Max_Type returns the type of the max_ for this ExponentialHistogramDataPoint. +// Calling this function on zero-initialized ExponentialHistogramDataPoint will cause a panic. +func (ms ExponentialHistogramDataPoint) Max_Type() OptionalType { + switch ms.orig.Max_.(type) { + case *otlpmetrics.ExponentialHistogramDataPoint_Max: + return OptionalTypeDouble + } + return OptionalTypeNone +} + +// Max returns the max associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) Max() float64 { + return (*ms.orig).GetMax() +} + +// SetMax replaces the max associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) SetMax(v float64) { + (*ms.orig).Max_ = &otlpmetrics.ExponentialHistogramDataPoint_Max{ + Max: v, + } +} + // CopyTo copies all properties from the current struct to the dest. func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint) { ms.Attributes().CopyTo(dest.Attributes()) @@ -1778,6 +1822,16 @@ func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoin ms.Negative().CopyTo(dest.Negative()) ms.Exemplars().CopyTo(dest.Exemplars()) dest.SetFlags(ms.Flags()) + switch ms.Min_Type() { + case OptionalTypeDouble: + dest.SetMin(ms.Min()) + } + + switch ms.Max_Type() { + case OptionalTypeDouble: + dest.SetMax(ms.Max()) + } + } // Buckets are a set of bucket counts, encoded in a contiguous array of counts. diff --git a/model/pdata/generated_metrics_test.go b/model/pdata/generated_metrics_test.go index b4618370058..18ffa71fc4a 100644 --- a/model/pdata/generated_metrics_test.go +++ b/model/pdata/generated_metrics_test.go @@ -1334,6 +1334,38 @@ func TestExponentialHistogramDataPoint_Flags(t *testing.T) { assert.EqualValues(t, testValFlags, ms.Flags()) } +func TestExponentialHistogramDataPointMin_Type(t *testing.T) { + tv := NewExponentialHistogramDataPoint() + assert.Equal(t, OptionalTypeNone, tv.Min_Type()) + assert.Equal(t, "", OptionalType(1000).String()) + tv.SetMin(float64(17.13)) + assert.Equal(t, OptionalTypeDouble, tv.Min_Type()) +} + +func TestExponentialHistogramDataPoint_Min(t *testing.T) { + ms := NewExponentialHistogramDataPoint() + assert.EqualValues(t, float64(0.0), ms.Min()) + testValMin := float64(17.13) + ms.SetMin(testValMin) + assert.EqualValues(t, testValMin, ms.Min()) +} + +func TestExponentialHistogramDataPointMax_Type(t *testing.T) { + tv := NewExponentialHistogramDataPoint() + assert.Equal(t, OptionalTypeNone, tv.Max_Type()) + assert.Equal(t, "", OptionalType(1000).String()) + tv.SetMax(float64(17.13)) + assert.Equal(t, OptionalTypeDouble, tv.Max_Type()) +} + +func TestExponentialHistogramDataPoint_Max(t *testing.T) { + ms := NewExponentialHistogramDataPoint() + assert.EqualValues(t, float64(0.0), ms.Max()) + testValMax := float64(17.13) + ms.SetMax(testValMax) + assert.EqualValues(t, testValMax, ms.Max()) +} + func TestBuckets_MoveTo(t *testing.T) { ms := generateTestBuckets() dest := NewBuckets() @@ -2086,6 +2118,8 @@ func fillTestExponentialHistogramDataPoint(tv ExponentialHistogramDataPoint) { fillTestBuckets(tv.Negative()) fillTestExemplarSlice(tv.Exemplars()) tv.SetFlags(MetricDataPointFlagsNone) + tv.SetMin(float64(17.13)) + tv.SetMax(float64(17.13)) } func generateTestBuckets() Buckets { From b2977824be67e6029846002495513f8c3ca560bb Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Tue, 1 Mar 2022 15:57:36 -0800 Subject: [PATCH 4/4] adding tests --- model/otlp/pb_test.go | 23 +++++++++++++++++++++++ model/pdata/metrics_test.go | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/model/otlp/pb_test.go b/model/otlp/pb_test.go index a9a88fd4b98..08e47bb97d4 100644 --- a/model/otlp/pb_test.go +++ b/model/otlp/pb_test.go @@ -81,6 +81,29 @@ func TestProtobufMetricsSizer_withNil(t *testing.T) { assert.Equal(t, 0, sizer.MetricsSize(pdata.NewMetrics())) } +func TestProtobufMetricsSizerWithOptional(t *testing.T) { + sizer := NewProtobufMetricsMarshaler().(pdata.MetricsSizer) + marshaler := NewProtobufMetricsMarshaler() + md := pdata.NewMetrics() + metric := md.ResourceMetrics().AppendEmpty().InstrumentationLibraryMetrics().AppendEmpty().Metrics().AppendEmpty() + metric.SetDataType(pdata.MetricDataTypeHistogram) + datapoint := metric.Histogram().DataPoints().AppendEmpty() + datapoint.SetMin(0.1) + datapoint.SetMax(100) + + size := sizer.MetricsSize(md) + + bytes, err := marshaler.MarshalMetrics(md) + require.NoError(t, err) + assert.Equal(t, len(bytes), size) + + p := NewProtobufMetricsUnmarshaler() + unmarshalled, err := p.UnmarshalMetrics(bytes) + assert.NoError(t, err) + assert.Equal(t, metric, unmarshalled.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0).Metrics().At(0)) + +} + func TestProtobufLogsSizer(t *testing.T) { sizer := NewProtobufLogsMarshaler().(pdata.LogsSizer) marshaler := NewProtobufLogsMarshaler() diff --git a/model/pdata/metrics_test.go b/model/pdata/metrics_test.go index b49bd85a7a0..3bed0bba0dc 100644 --- a/model/pdata/metrics_test.go +++ b/model/pdata/metrics_test.go @@ -521,6 +521,8 @@ func TestOtlpToFromInternalHistogramMutating(t *testing.T) { histogramDataPoints.At(0).SetExplicitBounds([]float64{1}) assert.EqualValues(t, []float64{1}, histogramDataPoints.At(0).ExplicitBounds()) histogramDataPoints.At(0).SetBucketCounts([]uint64{21, 32}) + histogramDataPoints.At(0).SetMin(10.1) + histogramDataPoints.At(0).SetMax(27) // Test that everything is updated. assert.EqualValues(t, &otlpmetrics.MetricsData{ ResourceMetrics: []*otlpmetrics.ResourceMetrics{ @@ -549,6 +551,8 @@ func TestOtlpToFromInternalHistogramMutating(t *testing.T) { TimeUnixNano: endTime + 1, BucketCounts: []uint64{21, 32}, ExplicitBounds: []float64{1}, + Min_: histogramDataPoints.At(0).orig.Min_, + Max_: histogramDataPoints.At(0).orig.Max_, }, }, },