From e43e1abc40428a6ee98e3bfd79bec1dfa2ed18cd Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Mon, 15 Jun 2020 12:23:30 -0400 Subject: [PATCH] Add support for arrays and maps for attribute values (#157) ## Summary This adds support for arrays and maps to attribute values, including support for nested values. This is a breaking protocol change. Resolves: https://github.com/open-telemetry/opentelemetry-specification/issues/376 Resolves: https://github.com/open-telemetry/opentelemetry-proto/issues/106 ## Motivation There are several reasons for this change: - The API defines that attributes values [may contain arrays of values](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#set-attributes). However the protocol has no way of representing array values. We need to add such capability. - We intend to support Log data type in the protocol, which also requires array values (it is a Log Data Model requirement). In addition, Log data type requires support of key-value lists (maps) as attribute values, including nested values. - There are long-standing requests to support nested values, arrays and maps for attributes: https://github.com/open-telemetry/opentelemetry-specification/issues/376 https://github.com/open-telemetry/opentelemetry-specification/pull/596 This change introduces AnyValue. AnyValue can represent arbitrary numeric, boolean, string, arrays or maps of values and allows nesting. AttributeKeyValue now uses AnyValue to store the "value" part. Note: below "Current" refers to the state of the "master" branch before this PR/commit is merged. "Proposed" refers to the schema suggested in this PR/commit. ## Performance This change has a negative impact on the performance when using canonical Go ProtoBuf compiler (compared to current OTLP state): ``` BenchmarkEncode/Current/Trace/Attribs-8 813 1479588 ns/op BenchmarkEncode/Proposed/Trace/Attribs-8 417 2873476 ns/op BenchmarkEncode/OpenCensus/Trace/Attribs-8 162 7354799 ns/op BenchmarkDecode/Current/Trace/Attribs-8 460 2646059 ns/op 1867627 B/op 36201 allocs/op BenchmarkDecode/Proposed/Trace/Attribs-8 246 4827671 ns/op 2171734 B/op 56209 allocs/op BenchmarkDecode/OpenCensus/Trace/Attribs-8 154 7560952 ns/op 2775949 B/op 76166 allocs/op ``` However, I do not think this is important for most applications. Serialization CPU and Memory usage is going to be a tiny portion of consumed resources for most applications, except certain specialized ones. For the perspective I am also showing OpenCensus in the benchmark to make it clear that we are still significantly faster than it despite becoming slower compared to the current state. More importantly, performance critical applications can use Gogo ProtoBuf compiler (Collector does use it), which _gains_ performance due to this change: ``` BenchmarkEncode/Current(Gogo)/Trace/Attribs-8 1645 705385 ns/op BenchmarkEncode/Proposed(Gogo)/Trace/Attribs-8 1555 698771 ns/op BenchmarkDecode/Current(Gogo)/Trace/Attribs-8 537 2241570 ns/op 2139634 B/op 36201 allocs/op BenchmarkDecode/Proposed(Gogo)/Trace/Attribs-8 600 2053120 ns/op 1323287 B/op 46205 allocs/op ``` With Gogo compiler proposed approach uses 40% less memory than the current schema. After considering all tradeoffs and alternates (see below) I believe this proposal is the best overall approach for OTLP. It is idiomatic ProtoBuf, easy to read and understand, is future-proof to adding new attribute types, has enough flexibility to represent simple and complex attribute values for all telemetry types and can be made fast by custom code generation for applications where it matters using Gogo ProtoBuf compiler. Note: all performance measurements are done for Go implementation only (although it is expected that other languages should exhibit somewhat similar behavior). ## Alternates Considered I also designed and benchmarked several alternate schemas, see below. ### Adding array value to AttributeKeyValue This is the simplest approach. It doubles down on the current OTLP protocol approach and simply adds "array_values" field to AttributeKeyValue, e.g.: ```proto message AttributeKeyValue { // all existing fields here. // A list of values. "key" field of each element in the list is ignored. repeated AttributeKeyValue array_values = 7; } ``` This eliminates the need to have a separate AnyValue message and has lower CPU usage because it requires less indirections and less memory allocations per value. However, this is semantically incorrect since the elements of the array must actually be values not key-value pairs, which this schema violates. It also uses more memory than the proposed approach: ```proto BenchmarkEncode/Proposed/Trace/Attribs-8 400 2869055 ns/op BenchmarkEncode/MoreFieldsinAKV/Trace/Attribs-8 754 1540978 ns/op BenchmarkDecode/Proposed/Trace/Attribs-8 250 4790010 ns/op 2171741 B/op 56209 allocs/op BenchmarkDecode/MoreFieldsinAKV/Trace/Attribs-8 420 2806918 ns/op 2347827 B/op 36201 allocs/op ``` It will become even worse memory-wise if in the future we need to add more data types to attributes. This approach is not scalable for future needs and is semantically wrong. ### Fat AnyValue instead of oneof. In this approach AnyValue contains all possible field values (similarly to how AttributeKeyValue is currently): ```proto message AnyValue { ValueType type = 1; bool bool_value = 2; string string_value = 3; int64 int_value = 4; double double_value = 5; repeated AnyValue list_values = 6; repeated AttributeKeyValue kvlist_values = 7; } message AttributeKeyValue { string key = 1; AnyValue value = 2; } ``` This results in significantly bigger AnyValue in-memory. In vast majority of cases attribute values of produced telemetry are strings (see e.g. semantic conventions for proof). Integer and boolean values are also used, although significantly less frequently than strings. Floating point number, arrays and maps are likely going to be diminishingly rare in the attributes. If we keep all these value types in AnyValue we will pay the cost for all these fields although almost always only string value would be present. Here are benchmarks comparing proposed schema and schema with fat AnyValue and using string and integer attributes in spans: ``` BenchmarkEncode/Proposed/Trace/Attribs-8 415 2894513 ns/op 456866 B/op 10005 allocs/op BenchmarkEncode/FatAnyValue/Trace/Attribs-8 646 1885003 ns/op 385024 B/op 1 allocs/op BenchmarkDecode/Proposed/Trace/Attribs-8 247 4872270 ns/op 2171746 B/op 56209 allocs/op BenchmarkDecode/FatAnyValue/Trace/Attribs-8 343 3423494 ns/op 2988081 B/op 46205 allocs/op ``` Memory usage with this approach is much higher and it also will become worse as we add more types. ### AnyValue plus ExoticValue This is based on fat AnyValue approach but rarely used value types are moved to a separate ExoticValue message that may be referenced from AnyValue if needed: ```proto message AnyValue { ValueType type = 1; bool bool_value = 2; string string_value = 3; int64 int_value = 4; ExoticValue exotic_value = 5; } message ExoticValue { double double_value = 1; repeated AnyValue array_values = 2; repeated AttributeKeyValue kvlist_values = 3; } message AttributeKeyValue { string key = 1; AnyValue value = 2; } ``` While this improves the performance (particularly lowers memory usage for most frequently used types of attributes) it is awkward and sacrifices too much readability and usability for small performance gains. Also for the rare cases it is slow and uses even more memory so its edge case behavior is not desirable. ### Using different schema for log data type I also considered using a different message definition for LogRecord attributes and Spans. This would allow to eliminate some of the requirements that we do not yet formally have for Span attributes (particularly the need to have maps of nested values). However, this does not help much in terms of performance, makes Span and LogRecord attributes non-interchangeable and significantly increases the bloat of code in applications that need to work with both Spans and Log records. --- gen/go/common/v1/common.pb.go | 382 +++++++++++++----- gen/go/resource/v1/resource.pb.go | 28 +- gen/go/trace/v1/trace.pb.go | 138 +++---- opentelemetry/proto/common/v1/common.proto | 59 ++- .../proto/resource/v1/resource.proto | 2 +- opentelemetry/proto/trace/v1/trace.proto | 6 +- 6 files changed, 401 insertions(+), 214 deletions(-) diff --git a/gen/go/common/v1/common.pb.go b/gen/go/common/v1/common.pb.go index 3930f9134..670f4286e 100644 --- a/gen/go/common/v1/common.pb.go +++ b/gen/go/common/v1/common.pb.go @@ -20,123 +20,291 @@ 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 -) - -var AttributeKeyValue_ValueType_name = map[int32]string{ - 0: "STRING", - 1: "INT", - 2: "DOUBLE", - 3: "BOOL", +// 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_ArrayValue + // *AnyValue_KvlistValue + 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} } -var AttributeKeyValue_ValueType_value = map[string]int32{ - "STRING": 0, - "INT": 1, - "DOUBLE": 2, - "BOOL": 3, +func (m *AnyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnyValue.Unmarshal(m, b) } - -func (x AttributeKeyValue_ValueType) String() string { - return proto.EnumName(AttributeKeyValue_ValueType_name, int32(x)) +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 -func (AttributeKeyValue_ValueType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{0, 0} +type isAnyValue_Value interface { + isAnyValue_Value() } -// 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:"-"` -} - -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} +type AnyValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` } -func (m *AttributeKeyValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttributeKeyValue.Unmarshal(m, b) +type AnyValue_BoolValue struct { + BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` } -func (m *AttributeKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttributeKeyValue.Marshal(b, m, deterministic) + +type AnyValue_IntValue struct { + IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` } -func (m *AttributeKeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttributeKeyValue.Merge(m, src) + +type AnyValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` } -func (m *AttributeKeyValue) XXX_Size() int { - return xxx_messageInfo_AttributeKeyValue.Size(m) + +type AnyValue_ArrayValue struct { + ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof"` } -func (m *AttributeKeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_AttributeKeyValue.DiscardUnknown(m) + +type AnyValue_KvlistValue struct { + KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof"` } -var xxx_messageInfo_AttributeKeyValue proto.InternalMessageInfo +func (*AnyValue_StringValue) isAnyValue_Value() {} + +func (*AnyValue_BoolValue) isAnyValue_Value() {} + +func (*AnyValue_IntValue) isAnyValue_Value() {} -func (m *AttributeKeyValue) GetKey() string { +func (*AnyValue_DoubleValue) isAnyValue_Value() {} + +func (*AnyValue_ArrayValue) isAnyValue_Value() {} + +func (*AnyValue_KvlistValue) isAnyValue_Value() {} + +func (m *AnyValue) GetValue() isAnyValue_Value { if m != nil { - return m.Key + return m.Value + } + return nil +} + +func (m *AnyValue) GetStringValue() string { + if x, ok := m.GetValue().(*AnyValue_StringValue); ok { + return x.StringValue } return "" } -func (m *AttributeKeyValue) GetType() AttributeKeyValue_ValueType { - if m != nil { - return m.Type +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) GetArrayValue() *ArrayValue { + if x, ok := m.GetValue().(*AnyValue_ArrayValue); ok { + return x.ArrayValue + } + return nil +} + +func (m *AnyValue) GetKvlistValue() *KeyValueList { + if x, ok := m.GetValue().(*AnyValue_KvlistValue); ok { + return x.KvlistValue + } + 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_ArrayValue)(nil), + (*AnyValue_KvlistValue)(nil), } - return AttributeKeyValue_STRING } -func (m *AttributeKeyValue) GetStringValue() string { +// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message +// since oneof in AnyValue does not allow repeated fields. +type ArrayValue struct { + // Array of values. The array may be empty (contain 0 elements). + Values []*AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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 (m *ArrayValue) GetValues() []*AnyValue { if m != nil { - return m.StringValue + return m.Values } - return "" + return nil +} + +// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message +// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need +// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to +// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches +// are semantically equivalent. +type KeyValueList struct { + // A collection of key/value pairs of key-value pairs. The list may be empty (may + // contain 0 elements). + Values []*KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyValueList) Reset() { *m = KeyValueList{} } +func (m *KeyValueList) String() string { return proto.CompactTextString(m) } +func (*KeyValueList) ProtoMessage() {} +func (*KeyValueList) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{2} +} + +func (m *KeyValueList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyValueList.Unmarshal(m, b) } +func (m *KeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) +} +func (m *KeyValueList) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValueList.Merge(m, src) +} +func (m *KeyValueList) XXX_Size() int { + return xxx_messageInfo_KeyValueList.Size(m) +} +func (m *KeyValueList) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValueList.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValueList proto.InternalMessageInfo -func (m *AttributeKeyValue) GetIntValue() int64 { +func (m *KeyValueList) GetValues() []*KeyValue { if m != nil { - return m.IntValue + return m.Values } - return 0 + return nil +} + +// KeyValue is a key-value pair that is used to store Span attributes, Link +// attributes, etc. +type KeyValue struct { + 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 *KeyValue) Reset() { *m = KeyValue{} } +func (m *KeyValue) String() string { return proto.CompactTextString(m) } +func (*KeyValue) ProtoMessage() {} +func (*KeyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{3} +} + +func (m *KeyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyValue.Unmarshal(m, b) +} +func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) +} +func (m *KeyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValue.Merge(m, src) } +func (m *KeyValue) XXX_Size() int { + return xxx_messageInfo_KeyValue.Size(m) +} +func (m *KeyValue) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValue proto.InternalMessageInfo -func (m *AttributeKeyValue) GetDoubleValue() float64 { +func (m *KeyValue) GetKey() string { if m != nil { - return m.DoubleValue + return m.Key } - return 0 + return "" } -func (m *AttributeKeyValue) GetBoolValue() bool { +func (m *KeyValue) GetValue() *AnyValue { 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 -// of AttributeKeyValue that only supports string values. +// of KeyValue that only supports string values. type StringKeyValue 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"` @@ -149,7 +317,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 +366,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,8 +402,10 @@ func (m *InstrumentationLibrary) GetVersion() string { } func init() { - proto.RegisterEnum("opentelemetry.proto.common.v1.AttributeKeyValue_ValueType", AttributeKeyValue_ValueType_name, AttributeKeyValue_ValueType_value) - proto.RegisterType((*AttributeKeyValue)(nil), "opentelemetry.proto.common.v1.AttributeKeyValue") + proto.RegisterType((*AnyValue)(nil), "opentelemetry.proto.common.v1.AnyValue") + proto.RegisterType((*ArrayValue)(nil), "opentelemetry.proto.common.v1.ArrayValue") + proto.RegisterType((*KeyValueList)(nil), "opentelemetry.proto.common.v1.KeyValueList") + proto.RegisterType((*KeyValue)(nil), "opentelemetry.proto.common.v1.KeyValue") proto.RegisterType((*StringKeyValue)(nil), "opentelemetry.proto.common.v1.StringKeyValue") proto.RegisterType((*InstrumentationLibrary)(nil), "opentelemetry.proto.common.v1.InstrumentationLibrary") } @@ -245,29 +415,31 @@ 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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0xe0, 0x51, 0x7e, 0xf9, 0x0f, 0xc4, 0x93, 0xcf, 0x4a, 0xee, 0x3b, 0xbc, 0x47, 0xbf, 0x3f, 0xe6, - 0x54, 0xfe, 0xaf, 0xb3, 0x2e, 0x10, 0x75, 0x2f, 0x2e, 0x1f, 0xb6, 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, + // 411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4b, 0xab, 0xd3, 0x40, + 0x14, 0xce, 0xdc, 0xdc, 0xdb, 0x9b, 0x9c, 0x14, 0x91, 0x41, 0xa4, 0x9b, 0x8b, 0xa1, 0x2e, 0x8c, + 0xca, 0x4d, 0x68, 0xdd, 0xb8, 0x51, 0x69, 0x05, 0x89, 0x58, 0xb1, 0x44, 0x70, 0xa1, 0x0b, 0x49, + 0x74, 0x88, 0x43, 0x93, 0x99, 0x3a, 0x99, 0x04, 0xf2, 0xe3, 0xfc, 0x6f, 0x32, 0x8f, 0xf4, 0xb1, + 0x69, 0xe9, 0xee, 0xcc, 0x97, 0xef, 0x71, 0x4e, 0x66, 0x0e, 0xbc, 0xe0, 0x5b, 0xc2, 0x24, 0xa9, + 0x48, 0x4d, 0xa4, 0xe8, 0x93, 0xad, 0xe0, 0x92, 0x27, 0xbf, 0x78, 0x5d, 0x73, 0x96, 0x74, 0x33, + 0x5b, 0xc5, 0x1a, 0xc6, 0x77, 0x47, 0x5c, 0x03, 0xc6, 0x96, 0xd1, 0xcd, 0xa6, 0xff, 0xae, 0xc0, + 0x5b, 0xb0, 0xfe, 0x5b, 0x5e, 0xb5, 0x04, 0x3f, 0x85, 0x71, 0x23, 0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, 0xc6, 0x89, 0x88, 0x47, 0x87, 0x11, 0xfe, 0xa0, 0xfc, 0x00, 0x8f, 0x3f, 0xb2, 0x46, + 0x8a, 0xb6, 0x26, 0x4c, 0xe6, 0x92, 0x72, 0xb6, 0xa2, 0x85, 0xc8, 0x45, 0x8f, 0x31, 0x5c, 0xb3, + 0xbc, 0xb6, 0x6f, 0x2f, 0xd3, 0x35, 0x9e, 0xc0, 0x6d, 0x47, 0x44, 0x43, 0x39, 0xb3, 0x2e, 0xc3, + 0x71, 0xf9, 0x17, 0x42, 0xca, 0x4f, 0x77, 0xbd, 0x0c, 0xde, 0xeb, 0x72, 0xad, 0xe0, 0x35, 0xfa, + 0xfe, 0xb6, 0xa4, 0xf2, 0x4f, 0x5b, 0x28, 0x42, 0xa2, 0x84, 0xf7, 0xfb, 0x45, 0x3a, 0xf2, 0xb9, + 0x37, 0x6b, 0x55, 0x12, 0x96, 0x94, 0x07, 0xdb, 0x55, 0x8c, 0x34, 0xfe, 0xea, 0x7f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x58, 0xdb, 0x68, 0x5e, 0x85, 0x03, 0x00, 0x00, } diff --git a/gen/go/resource/v1/resource.pb.go b/gen/go/resource/v1/resource.pb.go index cfc41c45e..a92e5749e 100644 --- a/gen/go/resource/v1/resource.pb.go +++ b/gen/go/resource/v1/resource.pb.go @@ -24,7 +24,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // Resource information. type Resource struct { // Set of labels that describe the resource. - Attributes []*v1.AttributeKeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` + Attributes []*v1.KeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` // dropped_attributes_count is the number of dropped attributes. If the value is 0, then // no attributes were dropped. DroppedAttributesCount uint32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` @@ -58,7 +58,7 @@ func (m *Resource) XXX_DiscardUnknown() { var xxx_messageInfo_Resource proto.InternalMessageInfo -func (m *Resource) GetAttributes() []*v1.AttributeKeyValue { +func (m *Resource) GetAttributes() []*v1.KeyValue { if m != nil { return m.Attributes } @@ -81,20 +81,20 @@ func init() { } var fileDescriptor_446f73eacf88f3f5 = []byte{ - // 231 bytes of a gzipped FileDescriptorProto + // 227 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcb, 0x2f, 0x48, 0xcd, 0x2b, 0x49, 0xcd, 0x49, 0xcd, 0x4d, 0x2d, 0x29, 0xaa, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2f, 0x33, 0x84, 0xb3, 0xf5, 0xc0, 0x52, 0x42, 0xf2, 0x28, 0xea, 0x21, 0x82, 0x7a, 0x70, 0x35, 0x65, 0x86, 0x52, 0x5a, 0xd8, 0x0c, 0x4c, - 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0x03, 0x19, 0x07, 0x61, 0x41, 0xf4, 0x29, 0x4d, 0x63, 0xe4, 0xe2, - 0x08, 0x82, 0xea, 0x15, 0x0a, 0xe0, 0xe2, 0x4a, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, - 0x2d, 0x96, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x32, 0xd0, 0xc3, 0x66, 0x1d, 0xd4, 0x8c, 0x32, - 0x43, 0x3d, 0x47, 0x98, 0x06, 0xef, 0xd4, 0xca, 0xb0, 0xc4, 0x9c, 0xd2, 0xd4, 0x20, 0x24, 0x33, - 0x84, 0x2c, 0xb8, 0x24, 0x52, 0x8a, 0xf2, 0x0b, 0x0a, 0x52, 0x53, 0xe2, 0x11, 0xa2, 0xf1, 0xc9, - 0xf9, 0xa5, 0x79, 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xbc, 0x41, 0x62, 0x50, 0x79, 0xb8, 0x39, - 0xc5, 0xce, 0x20, 0x59, 0xa7, 0x72, 0x2e, 0xa5, 0xcc, 0x7c, 0x3d, 0x02, 0x5e, 0x75, 0xe2, 0x85, - 0xb9, 0x3d, 0x00, 0x24, 0x15, 0xc0, 0x18, 0xe5, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0x04, 0x72, - 0xa0, 0x3e, 0x48, 0xb3, 0x2e, 0x22, 0x1c, 0x50, 0xcc, 0xd2, 0x85, 0x84, 0x4a, 0x7a, 0x6a, 0x9e, - 0x7e, 0x3a, 0x4a, 0x68, 0x27, 0xb1, 0x81, 0x65, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc9, - 0xc6, 0x84, 0x9f, 0x97, 0x01, 0x00, 0x00, + 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0x03, 0x19, 0x07, 0x61, 0x41, 0xf4, 0x29, 0xf5, 0x32, 0x72, 0x71, + 0x04, 0x41, 0xf5, 0x0a, 0xb9, 0x73, 0x71, 0x25, 0x96, 0x94, 0x14, 0x65, 0x26, 0x95, 0x96, 0xa4, + 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0x61, 0xb3, 0x0e, 0x6a, 0x46, 0x99, + 0xa1, 0x9e, 0x77, 0x6a, 0x65, 0x58, 0x62, 0x4e, 0x69, 0x6a, 0x10, 0x92, 0x56, 0x21, 0x0b, 0x2e, + 0x89, 0x94, 0xa2, 0xfc, 0x82, 0x82, 0xd4, 0x94, 0x78, 0x84, 0x68, 0x7c, 0x72, 0x7e, 0x69, 0x5e, + 0x89, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6f, 0x90, 0x18, 0x54, 0xde, 0x11, 0x2e, 0xed, 0x0c, 0x92, + 0x75, 0x2a, 0xe7, 0x52, 0xca, 0xcc, 0xd7, 0x23, 0xe0, 0x43, 0x27, 0x5e, 0x98, 0x93, 0x03, 0x40, + 0x52, 0x01, 0x8c, 0x51, 0x0e, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x20, 0x77, 0xe9, 0x83, 0x34, + 0xeb, 0x22, 0xbc, 0x8f, 0x62, 0x96, 0x2e, 0x24, 0x30, 0xd2, 0x53, 0xf3, 0xf4, 0xd3, 0x51, 0x02, + 0x39, 0x89, 0x0d, 0x2c, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xba, 0x7f, 0x2f, 0x93, 0x8e, + 0x01, 0x00, 0x00, } diff --git a/gen/go/trace/v1/trace.pb.go b/gen/go/trace/v1/trace.pb.go index 7bda6aadb..7aaf1c0f0 100644 --- a/gen/go/trace/v1/trace.pb.go +++ b/gen/go/trace/v1/trace.pb.go @@ -324,7 +324,7 @@ type Span struct { // "/http/server_latency": 300 // "abc.com/myattribute": true // "abc.com/score": 10.239 - Attributes []*v11.AttributeKeyValue `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes,omitempty"` + Attributes []*v11.KeyValue `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes,omitempty"` // dropped_attributes_count is the number of attributes that were discarded. Attributes // can be discarded because their keys are too long or because there are too many // attributes. If this value is 0, then no attributes were dropped. @@ -430,7 +430,7 @@ func (m *Span) GetEndTimeUnixNano() uint64 { return 0 } -func (m *Span) GetAttributes() []*v11.AttributeKeyValue { +func (m *Span) GetAttributes() []*v11.KeyValue { if m != nil { return m.Attributes } @@ -488,7 +488,7 @@ type Span_Event struct { // This field is semantically required to be set to non-empty string. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // attributes is a collection of attribute key/value pairs on the event. - Attributes []*v11.AttributeKeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` + Attributes []*v11.KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` // dropped_attributes_count is the number of dropped attributes. If the value is 0, // then no attributes were dropped. DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` @@ -536,7 +536,7 @@ func (m *Span_Event) GetName() string { return "" } -func (m *Span_Event) GetAttributes() []*v11.AttributeKeyValue { +func (m *Span_Event) GetAttributes() []*v11.KeyValue { if m != nil { return m.Attributes } @@ -563,7 +563,7 @@ type Span_Link struct { // The trace_state associated with the link. TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"` // attributes is a collection of attribute key/value pairs on the link. - Attributes []*v11.AttributeKeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` + Attributes []*v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` // dropped_attributes_count is the number of dropped attributes. If the value is 0, // then no attributes were dropped. DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` @@ -618,7 +618,7 @@ func (m *Span_Link) GetTraceState() string { return "" } -func (m *Span_Link) GetAttributes() []*v11.AttributeKeyValue { +func (m *Span_Link) GetAttributes() []*v11.KeyValue { if m != nil { return m.Attributes } @@ -700,68 +700,68 @@ func init() { } var fileDescriptor_5c407ac9c675a601 = []byte{ - // 1008 bytes of a gzipped FileDescriptorProto + // 1006 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0x1b, 0x37, - 0x10, 0xce, 0xea, 0xdf, 0xa3, 0x1f, 0xaf, 0x19, 0xc7, 0xd9, 0x38, 0x2d, 0x22, 0x08, 0x01, 0xaa, - 0x36, 0x88, 0x14, 0xbb, 0x28, 0x90, 0x02, 0x0d, 0x5a, 0x45, 0x5a, 0x03, 0x82, 0x5d, 0x59, 0xa0,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, 0x0c, 0x7a, 0x0a, 0xdb, 0x7d, 0xb1, 0x24, 0x3e, 0xa7, 0x9d, 0x60, 0x66, - 0x6e, 0x00, 0x3b, 0x8b, 0x76, 0xc1, 0xee, 0x31, 0x42, 0x7d, 0x2e, 0x98, 0x7b, 0x39, 0x65, 0x8c, - 0x32, 0x1a, 0x97, 0x36, 0x90, 0xea, 0x48, 0x46, 0x82, 0xda, 0x79, 0xb4, 0x03, 0xd5, 0x8e, 0x1f, - 0x30, 0x42, 0xaf, 0xdc, 0x4b, 0x1e, 0xaa, 0xd0, 0x2e, 0x68, 0xda, 0x90, 0x05, 0x73, 0x1e, 0x86, - 0x5c, 0x8a, 0x1e, 0x13, 0x9c, 0x51, 0xbb, 0x88, 0x9e, 0xc1, 0x4e, 0x7a, 0xd3, 0xba, 0x97, 0xe7, - 0x24, 0x0a, 0x15, 0xa3, 0x76, 0x09, 0xed, 0x01, 0x3a, 0x22, 0xdc, 0x67, 0x74, 0x18, 0xb0, 0xa9, - 0x14, 0x94, 0xeb, 0x8b, 0xc7, 0xde, 0x42, 0x65, 0x28, 0x76, 0x26, 0x32, 0xd0, 0x20, 0x40, 0x35, - 0x80, 0xd3, 0x48, 0x9d, 0xfe, 0x8a, 0x89, 0x98, 0x31, 0xbb, 0xac, 0x45, 0xc7, 0x82, 0xcf, 0x17, - 0xfa, 0xd8, 0x84, 0x86, 0x54, 0xb4, 0xa9, 0x2f, 0x14, 0x0b, 0x04, 0xf1, 0xe3, 0x9a, 0xaa, 0x68, - 0x1b, 0xca, 0x63, 0x41, 0x96, 0x84, 0xfb, 0x64, 0xe2, 0x33, 0xbb, 0xa6, 0x33, 0xef, 0x11, 0x45, - 0x4e, 0x64, 0x18, 0xda, 0xdb, 0xba, 0xe4, 0xb1, 0x20, 0x91, 0x3a, 0x67, 0x42, 0xf1, 0x29, 0xd1, - 0x61, 0xec, 0x8f, 0x02, 0x5e, 0x71, 0xb9, 0xb1, 0x29, 0x1f, 0xe1, 0x4c, 0xaf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 0x38, 0x89, + 0xf4, 0xc9, 0xaf, 0x98, 0x88, 0x39, 0x73, 0xcb, 0x46, 0x74, 0x2c, 0xf8, 0x62, 0x69, 0xae, 0x4d, + 0x18, 0x48, 0xc5, 0xb8, 0xfa, 0x42, 0x33, 0x25, 0x48, 0x10, 0xf7, 0x54, 0x45, 0xdb, 0x50, 0x1e, + 0x0b, 0xb2, 0x22, 0x3c, 0x20, 0xd3, 0x80, 0xb9, 0x35, 0x53, 0x79, 0x8f, 0x68, 0x72, 0x2c, 0xc3, + 0xd0, 0xdd, 0x36, 0x2d, 0x8f, 0x05, 0x89, 0xf4, 0x19, 0x13, 0x9a, 0xcf, 0x88, 0x49, 0xe3, 0xbe, + 0x17, 0xf0, 0x92, 0xcb, 0x8d, 0x43, 0x79, 0x0f, 0xa7, 0xc6, 0x1a, 0x1a, 0xe7, 0xd0, 0xf9, 0xe5, + 0xdd, 0x9c, 0xeb, 0xb3, 0x68, 0x6a, 0x96, 0xb4, 0x6d, 0x68, 0x6f, 0xae, 0x3f, 0x52, 0xd6, 0xb2, + 0xbc, 0x89, 0x3f, 0x59, 0xe6, 0x4c, 0xb4, 0xe7, 0xd7, 0x5f, 0x4b, 0xd3, 0x82, 0x75, 0x7f, 0xf3, + 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0xda, 0x0b, 0xc1, 0x54, 0x09, 0x00, 0x00, } diff --git a/opentelemetry/proto/common/v1/common.proto b/opentelemetry/proto/common/v1/common.proto index 45fbcdb75..49bf436b2 100644 --- a/opentelemetry/proto/common/v1/common.proto +++ b/opentelemetry/proto/common/v1/common.proto @@ -21,34 +21,49 @@ 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"; -// 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; +// 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_value = 5; + KeyValueList kvlist_value = 6; + } +} - // type of the value. - ValueType type = 2; +// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message +// since oneof in AnyValue does not allow repeated fields. +message ArrayValue { + // Array of values. The array may be empty (contain 0 elements). + repeated AnyValue values = 1; +} - // 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). +// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message +// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need +// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to +// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches +// are semantically equivalent. +message KeyValueList { + // A collection of key/value pairs of key-value pairs. The list may be empty (may + // contain 0 elements). + repeated KeyValue values = 1; +} - string string_value = 3; - int64 int_value = 4; - double double_value = 5; - bool bool_value = 6; +// KeyValue is a key-value pair that is used to store Span attributes, Link +// attributes, etc. +message KeyValue { + string key = 1; + AnyValue value = 2; } // StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version -// of AttributeKeyValue that only supports string values. +// of KeyValue that only supports string values. message StringKeyValue { string key = 1; string value = 2; diff --git a/opentelemetry/proto/resource/v1/resource.proto b/opentelemetry/proto/resource/v1/resource.proto index a9e1711af..fa5d97c6f 100644 --- a/opentelemetry/proto/resource/v1/resource.proto +++ b/opentelemetry/proto/resource/v1/resource.proto @@ -26,7 +26,7 @@ option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/resour // Resource information. message Resource { // Set of labels that describe the resource. - repeated opentelemetry.proto.common.v1.AttributeKeyValue attributes = 1; + repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; // dropped_attributes_count is the number of dropped attributes. If the value is 0, then // no attributes were dropped. diff --git a/opentelemetry/proto/trace/v1/trace.proto b/opentelemetry/proto/trace/v1/trace.proto index 33a6aea07..5a2350fde 100644 --- a/opentelemetry/proto/trace/v1/trace.proto +++ b/opentelemetry/proto/trace/v1/trace.proto @@ -157,7 +157,7 @@ message Span { // "/http/server_latency": 300 // "abc.com/myattribute": true // "abc.com/score": 10.239 - repeated opentelemetry.proto.common.v1.AttributeKeyValue attributes = 9; + repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; // dropped_attributes_count is the number of attributes that were discarded. Attributes // can be discarded because their keys are too long or because there are too many @@ -175,7 +175,7 @@ message Span { string name = 2; // attributes is a collection of attribute key/value pairs on the event. - repeated opentelemetry.proto.common.v1.AttributeKeyValue attributes = 3; + repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; // dropped_attributes_count is the number of dropped attributes. If the value is 0, // then no attributes were dropped. @@ -205,7 +205,7 @@ message Span { string trace_state = 3; // attributes is a collection of attribute key/value pairs on the link. - repeated opentelemetry.proto.common.v1.AttributeKeyValue attributes = 4; + repeated opentelemetry.proto.common.v1.KeyValue attributes = 4; // dropped_attributes_count is the number of dropped attributes. If the value is 0, // then no attributes were dropped.