diff --git a/gen/go/common/v1/common.pb.go b/gen/go/common/v1/common.pb.go index 3930f913..bc23124c 100644 --- a/gen/go/common/v1/common.pb.go +++ b/gen/go/common/v1/common.pb.go @@ -20,59 +20,247 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// ValueType is the enumeration of possible types that value can have. -type AttributeKeyValue_ValueType int32 - -const ( - AttributeKeyValue_STRING AttributeKeyValue_ValueType = 0 - AttributeKeyValue_INT AttributeKeyValue_ValueType = 1 - AttributeKeyValue_DOUBLE AttributeKeyValue_ValueType = 2 - AttributeKeyValue_BOOL AttributeKeyValue_ValueType = 3 -) +// AnyValue is used to represent any type of attribute value. AnyValue may contain a +// primitive value such as a string or integer or it may contain an arbitrary nested +// object containing arrays, key-value lists and primitives. +type AnyValue struct { + // The value is one of the listed fields. It is valid for all values to be unspecified + // in which case this AnyValue is considered to be "null". + // + // Types that are valid to be assigned to Value: + // *AnyValue_StringValue + // *AnyValue_BoolValue + // *AnyValue_IntValue + // *AnyValue_DoubleValue + // *AnyValue_ArrayValues + // *AnyValue_KvlistValues + Value isAnyValue_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnyValue) Reset() { *m = AnyValue{} } +func (m *AnyValue) String() string { return proto.CompactTextString(m) } +func (*AnyValue) ProtoMessage() {} +func (*AnyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{0} +} + +func (m *AnyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnyValue.Unmarshal(m, b) +} +func (m *AnyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) +} +func (m *AnyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnyValue.Merge(m, src) +} +func (m *AnyValue) XXX_Size() int { + return xxx_messageInfo_AnyValue.Size(m) +} +func (m *AnyValue) XXX_DiscardUnknown() { + xxx_messageInfo_AnyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_AnyValue proto.InternalMessageInfo + +type isAnyValue_Value interface { + isAnyValue_Value() +} + +type AnyValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type AnyValue_BoolValue struct { + BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type AnyValue_IntValue struct { + IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type AnyValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type AnyValue_ArrayValues struct { + ArrayValues *ArrayValue `protobuf:"bytes,5,opt,name=array_values,json=arrayValues,proto3,oneof"` +} + +type AnyValue_KvlistValues struct { + KvlistValues *AttributeKeyValueList `protobuf:"bytes,6,opt,name=kvlist_values,json=kvlistValues,proto3,oneof"` +} + +func (*AnyValue_StringValue) isAnyValue_Value() {} + +func (*AnyValue_BoolValue) isAnyValue_Value() {} + +func (*AnyValue_IntValue) isAnyValue_Value() {} + +func (*AnyValue_DoubleValue) isAnyValue_Value() {} + +func (*AnyValue_ArrayValues) isAnyValue_Value() {} + +func (*AnyValue_KvlistValues) isAnyValue_Value() {} + +func (m *AnyValue) GetValue() isAnyValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *AnyValue) GetStringValue() string { + if x, ok := m.GetValue().(*AnyValue_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *AnyValue) GetBoolValue() bool { + if x, ok := m.GetValue().(*AnyValue_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *AnyValue) GetIntValue() int64 { + if x, ok := m.GetValue().(*AnyValue_IntValue); ok { + return x.IntValue + } + return 0 +} + +func (m *AnyValue) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*AnyValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (m *AnyValue) GetArrayValues() *ArrayValue { + if x, ok := m.GetValue().(*AnyValue_ArrayValues); ok { + return x.ArrayValues + } + return nil +} -var AttributeKeyValue_ValueType_name = map[int32]string{ - 0: "STRING", - 1: "INT", - 2: "DOUBLE", - 3: "BOOL", +func (m *AnyValue) GetKvlistValues() *AttributeKeyValueList { + if x, ok := m.GetValue().(*AnyValue_KvlistValues); ok { + return x.KvlistValues + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AnyValue) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AnyValue_StringValue)(nil), + (*AnyValue_BoolValue)(nil), + (*AnyValue_IntValue)(nil), + (*AnyValue_DoubleValue)(nil), + (*AnyValue_ArrayValues)(nil), + (*AnyValue_KvlistValues)(nil), + } } -var AttributeKeyValue_ValueType_value = map[string]int32{ - "STRING": 0, - "INT": 1, - "DOUBLE": 2, - "BOOL": 3, +type ArrayValue struct { + // Array of values. The array may be empty (contain 0 elements). + ArrayValues []*AnyValue `protobuf:"bytes,1,rep,name=array_values,json=arrayValues,proto3" json:"array_values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x AttributeKeyValue_ValueType) String() string { - return proto.EnumName(AttributeKeyValue_ValueType_name, int32(x)) +func (m *ArrayValue) Reset() { *m = ArrayValue{} } +func (m *ArrayValue) String() string { return proto.CompactTextString(m) } +func (*ArrayValue) ProtoMessage() {} +func (*ArrayValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{1} +} + +func (m *ArrayValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ArrayValue.Unmarshal(m, b) +} +func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) } +func (m *ArrayValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArrayValue.Merge(m, src) +} +func (m *ArrayValue) XXX_Size() int { + return xxx_messageInfo_ArrayValue.Size(m) +} +func (m *ArrayValue) XXX_DiscardUnknown() { + xxx_messageInfo_ArrayValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ArrayValue proto.InternalMessageInfo -func (AttributeKeyValue_ValueType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{0, 0} +func (m *ArrayValue) GetArrayValues() []*AnyValue { + if m != nil { + return m.ArrayValues + } + return nil +} + +type AttributeKeyValueList struct { + // List of key-value pairs. The list may be empty (contain 0 elements). + KvlistValues []*AttributeKeyValue `protobuf:"bytes,1,rep,name=kvlist_values,json=kvlistValues,proto3" json:"kvlist_values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AttributeKeyValueList) Reset() { *m = AttributeKeyValueList{} } +func (m *AttributeKeyValueList) String() string { return proto.CompactTextString(m) } +func (*AttributeKeyValueList) ProtoMessage() {} +func (*AttributeKeyValueList) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{2} +} + +func (m *AttributeKeyValueList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AttributeKeyValueList.Unmarshal(m, b) +} +func (m *AttributeKeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AttributeKeyValueList.Marshal(b, m, deterministic) +} +func (m *AttributeKeyValueList) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributeKeyValueList.Merge(m, src) +} +func (m *AttributeKeyValueList) XXX_Size() int { + return xxx_messageInfo_AttributeKeyValueList.Size(m) +} +func (m *AttributeKeyValueList) XXX_DiscardUnknown() { + xxx_messageInfo_AttributeKeyValueList.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributeKeyValueList proto.InternalMessageInfo + +func (m *AttributeKeyValueList) GetKvlistValues() []*AttributeKeyValue { + if m != nil { + return m.KvlistValues + } + return nil } // AttributeKeyValue is a key-value pair that is used to store Span attributes, Link // attributes, etc. type AttributeKeyValue struct { - // key part of the key-value pair. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // type of the value. - Type AttributeKeyValue_ValueType `protobuf:"varint,2,opt,name=type,proto3,enum=opentelemetry.proto.common.v1.AttributeKeyValue_ValueType" json:"type,omitempty"` - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` - IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3" json:"int_value,omitempty"` - DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` - BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AttributeKeyValue) Reset() { *m = AttributeKeyValue{} } func (m *AttributeKeyValue) String() string { return proto.CompactTextString(m) } func (*AttributeKeyValue) ProtoMessage() {} func (*AttributeKeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{0} + return fileDescriptor_62ba46dcb97aa817, []int{3} } func (m *AttributeKeyValue) XXX_Unmarshal(b []byte) error { @@ -100,39 +288,11 @@ func (m *AttributeKeyValue) GetKey() string { return "" } -func (m *AttributeKeyValue) GetType() AttributeKeyValue_ValueType { - if m != nil { - return m.Type - } - return AttributeKeyValue_STRING -} - -func (m *AttributeKeyValue) GetStringValue() string { - if m != nil { - return m.StringValue - } - return "" -} - -func (m *AttributeKeyValue) GetIntValue() int64 { - if m != nil { - return m.IntValue - } - return 0 -} - -func (m *AttributeKeyValue) GetDoubleValue() float64 { +func (m *AttributeKeyValue) GetValue() *AnyValue { if m != nil { - return m.DoubleValue - } - return 0 -} - -func (m *AttributeKeyValue) GetBoolValue() bool { - if m != nil { - return m.BoolValue + return m.Value } - return false + return nil } // StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version @@ -149,7 +309,7 @@ func (m *StringKeyValue) Reset() { *m = StringKeyValue{} } func (m *StringKeyValue) String() string { return proto.CompactTextString(m) } func (*StringKeyValue) ProtoMessage() {} func (*StringKeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{1} + return fileDescriptor_62ba46dcb97aa817, []int{4} } func (m *StringKeyValue) XXX_Unmarshal(b []byte) error { @@ -198,7 +358,7 @@ func (m *InstrumentationLibrary) Reset() { *m = InstrumentationLibrary{} func (m *InstrumentationLibrary) String() string { return proto.CompactTextString(m) } func (*InstrumentationLibrary) ProtoMessage() {} func (*InstrumentationLibrary) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{2} + return fileDescriptor_62ba46dcb97aa817, []int{5} } func (m *InstrumentationLibrary) XXX_Unmarshal(b []byte) error { @@ -234,7 +394,9 @@ func (m *InstrumentationLibrary) GetVersion() string { } func init() { - proto.RegisterEnum("opentelemetry.proto.common.v1.AttributeKeyValue_ValueType", AttributeKeyValue_ValueType_name, AttributeKeyValue_ValueType_value) + proto.RegisterType((*AnyValue)(nil), "opentelemetry.proto.common.v1.AnyValue") + proto.RegisterType((*ArrayValue)(nil), "opentelemetry.proto.common.v1.ArrayValue") + proto.RegisterType((*AttributeKeyValueList)(nil), "opentelemetry.proto.common.v1.AttributeKeyValueList") proto.RegisterType((*AttributeKeyValue)(nil), "opentelemetry.proto.common.v1.AttributeKeyValue") proto.RegisterType((*StringKeyValue)(nil), "opentelemetry.proto.common.v1.StringKeyValue") proto.RegisterType((*InstrumentationLibrary)(nil), "opentelemetry.proto.common.v1.InstrumentationLibrary") @@ -245,29 +407,32 @@ func init() { } var fileDescriptor_62ba46dcb97aa817 = []byte{ - // 377 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xdb, 0x8b, 0x9b, 0x40, - 0x18, 0xc5, 0x3b, 0x6a, 0x2e, 0x7e, 0x09, 0xc1, 0x0e, 0xa5, 0x08, 0x25, 0x60, 0x7c, 0x92, 0x42, - 0x94, 0xb4, 0x50, 0x4a, 0x1f, 0x0a, 0xb5, 0x37, 0x42, 0x43, 0x12, 0x4c, 0xda, 0x87, 0xbe, 0x14, - 0x6d, 0x07, 0x3b, 0xac, 0xce, 0xb8, 0x93, 0x51, 0xf0, 0xaf, 0xda, 0x7f, 0x71, 0x71, 0xc6, 0xbd, - 0x84, 0x85, 0xbc, 0xc8, 0x99, 0xdf, 0x39, 0x9e, 0xf9, 0xd0, 0x0f, 0x5e, 0xf3, 0x8a, 0x30, 0x49, - 0x0a, 0x52, 0x12, 0x29, 0xda, 0xa8, 0x12, 0x5c, 0xf2, 0xe8, 0x2f, 0x2f, 0x4b, 0xce, 0xa2, 0x66, - 0xd5, 0xab, 0x50, 0x61, 0x3c, 0x3f, 0xcb, 0x6a, 0x18, 0xf6, 0x89, 0x66, 0xe5, 0xdf, 0x18, 0xf0, - 0xfc, 0x93, 0x94, 0x82, 0x66, 0xb5, 0x24, 0x3f, 0x48, 0xfb, 0x2b, 0x2d, 0x6a, 0x82, 0x1d, 0x30, - 0xaf, 0x48, 0xeb, 0x22, 0x0f, 0x05, 0x76, 0xd2, 0x49, 0xbc, 0x05, 0x4b, 0xb6, 0x15, 0x71, 0x0d, - 0x0f, 0x05, 0xb3, 0x37, 0x1f, 0xc2, 0x8b, 0xad, 0xe1, 0x93, 0xc6, 0x50, 0x3d, 0x8f, 0x6d, 0x45, - 0x12, 0xd5, 0x83, 0x17, 0x30,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b6, 0xe7, 0xac, 0x67, 0xa9, 0x77, - 0x29, 0x27, 0x2c, 0xca, 0x1f, 0xad, 0x54, 0x36, 0x54, 0xfc, 0xed, 0x6d, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x84, 0x93, 0x08, 0x5f, 0x7a, 0x02, 0x00, 0x00, + // 429 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5d, 0x8b, 0xd3, 0x40, + 0x14, 0xcd, 0x6c, 0xf6, 0xa3, 0xb9, 0xa9, 0xa2, 0x83, 0x4a, 0x5f, 0x16, 0x43, 0x7c, 0x30, 0x0a, + 0x9b, 0xb8, 0xab, 0x0f, 0xbe, 0x28, 0x6c, 0x05, 0x89, 0xba, 0xc8, 0x12, 0x51, 0x44, 0x1f, 0x24, + 0x71, 0x87, 0x38, 0x34, 0x99, 0xa9, 0x93, 0x49, 0x20, 0x7f, 0xd1, 0x5f, 0x25, 0xf3, 0xd1, 0x8f, + 0x54, 0x69, 0xe9, 0xdb, 0x9d, 0xd3, 0x73, 0xcf, 0xb9, 0xa7, 0xb9, 0x17, 0x9e, 0xf2, 0x39, 0x61, + 0x92, 0x54, 0xa4, 0x26, 0x52, 0xf4, 0xc9, 0x5c, 0x70, 0xc9, 0x93, 0x9f, 0xbc, 0xae, 0x39, 0x4b, + 0xba, 0x73, 0x5b, 0xc5, 0x1a, 0xc6, 0xa7, 0x03, 0xae, 0x01, 0x63, 0xcb, 0xe8, 0xce, 0xc3, 0x3f, + 0x07, 0x30, 0xba, 0x64, 0xfd, 0x97, 0xbc, 0x6a, 0x09, 0x7e, 0x04, 0xe3, 0x46, 0x0a, 0xca, 0xca, + 0x1f, 0x9d, 0x7a, 0x4f, 0x50, 0x80, 0x22, 0x2f, 0x75, 0x32, 0xdf, 0xa0, 0x86, 0xf4, 0x10, 0xa0, + 0xe0, 0xbc, 0xb2, 0x94, 0x83, 0x00, 0x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, 0xe1, 0xc1, 0x3b, + 0xd6, 0x48, 0xd1, 0xd6, 0x84, 0xc9, 0x5c, 0x52, 0xce, 0xae, 0x68, 0x21, 0x72, 0xd1, 0x63, 0x0c, + 0x87, 0x2c, 0xaf, 0xed, 0xee, 0x66, 0xba, 0xc6, 0x13, 0x38, 0xe9, 0x88, 0x68, 0x28, 0x67, 0x56, + 0x65, 0xf1, 0x9c, 0xfe, 0x86, 0x80, 0xf2, 0xed, 0x53, 0x4f, 0xfd, 0x37, 0xba, 0xbc, 0x56, 0xf0, + 0x35, 0xfa, 0xf6, 0xba, 0xa4, 0xf2, 0x57, 0x5b, 0x28, 0x42, 0xa2, 0x1a, 0xcf, 0x56, 0x87, 0x38, + 0xd0, 0x39, 0x33, 0x67, 0x59, 0x12, 0x96, 0x94, 0x6b, 0xd7, 0x59, 0x1c, 0x6b, 0xfc, 0xf9, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x84, 0xf2, 0xe3, 0xc5, 0x03, 0x00, 0x00, } diff --git a/opentelemetry/proto/common/v1/common.proto b/opentelemetry/proto/common/v1/common.proto index 45fbcdb7..c745733e 100644 --- a/opentelemetry/proto/common/v1/common.proto +++ b/opentelemetry/proto/common/v1/common.proto @@ -21,30 +21,37 @@ option java_package = "io.opentelemetry.proto.common.v1"; option java_outer_classname = "CommonProto"; option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1"; +// AnyValue is used to represent any type of attribute value. AnyValue may contain a +// primitive value such as a string or integer or it may contain an arbitrary nested +// object containing arrays, key-value lists and primitives. +message AnyValue { + // The value is one of the listed fields. It is valid for all values to be unspecified + // in which case this AnyValue is considered to be "null". + oneof value { + string string_value = 1; + bool bool_value = 2; + int64 int_value = 3; + double double_value = 4; + ArrayValue array_values = 5; + AttributeKeyValueList kvlist_values = 6; + } +} + +message ArrayValue { + // Array of values. The array may be empty (contain 0 elements). + repeated AnyValue array_values = 1; +} + +message AttributeKeyValueList { + // List of key-value pairs. The list may be empty (contain 0 elements). + repeated AttributeKeyValue kvlist_values = 1; +} + // AttributeKeyValue is a key-value pair that is used to store Span attributes, Link // attributes, etc. message AttributeKeyValue { - // ValueType is the enumeration of possible types that value can have. - enum ValueType { - STRING = 0; - INT = 1; - DOUBLE = 2; - BOOL = 3; - }; - - // key part of the key-value pair. string key = 1; - - // type of the value. - ValueType type = 2; - - // Only one of the following fields is supposed to contain data (determined by `type` field). - // This is deliberately not using Protobuf `oneof` for performance reasons (verified by benchmarks). - - string string_value = 3; - int64 int_value = 4; - double double_value = 5; - bool bool_value = 6; + AnyValue value = 2; } // StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version