diff --git a/api/otlp/Makefile b/api/otlp/Makefile index 59915edf39..0028470e31 100644 --- a/api/otlp/Makefile +++ b/api/otlp/Makefile @@ -16,11 +16,11 @@ endef OPENTELEMETRY_PROTO_SRC_DIR=.tmp/opentelemetry-proto # The SHA matching the current version of the proto to use -OPENTELEMETRY_PROTO_VERSION=v1.3.2 +OPENTELEMETRY_PROTO_VERSION=v1.5.0 # 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 $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1experimental/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1experimental/*.proto)) +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 $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1development/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1development/*.proto)) # Target directory to write generated files to. # PROTO_TARGET_GEN_DIR=otlp @@ -35,7 +35,7 @@ PROTO_PACKAGE=github.com/grafana/pyroscope/$(PROTO_TARGET_GEN_DIR) # Intermediate directory used during generation. PROTO_INTERMEDIATE_DIR=.tmp/patched-otlp-proto -DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0 +DOCKER_PROTOBUF ?= otel/build-protobuf:0.23.0 PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD}/$(PROTO_INTERMEDIATE_DIR) ${DOCKER_PROTOBUF} --proto_path=${PWD} PROTO_INCLUDES := -I/usr/include/github.com/gogo/protobuf -I./ @@ -72,7 +72,7 @@ genproto_sub: # reserved 1000 -> repeated ScopeLogs deprecated_scope_logs = 1000; sed 's/reserved 1000;/repeated ScopeLogs deprecated_scope_logs = 1000;/g' $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/logs/v1/logs.proto 1<> $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/logs/v1/logs.proto # reserved 1000 -> repeated ScopeProfiles deprecated_scope_profiles = 1000; - sed 's/reserved 1000;/repeated ScopeProfiles deprecated_scope_profiles = 1000;/g' $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/profiles/v1experimental/profiles.proto 1<> $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/profiles/v1experimental/profiles.proto + sed 's/reserved 1000;/repeated ScopeProfiles deprecated_scope_profiles = 1000;/g' $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/profiles/v1development/profiles.proto 1<> $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/profiles/v1development/profiles.proto # reserved 1000 -> repeated ScopeMetrics deprecated_scope_metrics = 1000; sed 's/reserved 1000;/repeated ScopeMetrics deprecated_scope_metrics = 1000;/g' $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/metrics/v1/metrics.proto 1<> $(PROTO_INTERMEDIATE_DIR)/opentelemetry/proto/metrics/v1/metrics.proto # reserved 1000 -> repeated ScopeSpans deprecated_scope_spans = 1000; diff --git a/api/otlp/collector/profiles/v1experimental/profiles_service.pb.go b/api/otlp/collector/profiles/v1development/profiles_service.pb.go similarity index 84% rename from api/otlp/collector/profiles/v1experimental/profiles_service.pb.go rename to api/otlp/collector/profiles/v1development/profiles_service.pb.go index f037276971..6d7d846ffb 100644 --- a/api/otlp/collector/profiles/v1experimental/profiles_service.pb.go +++ b/api/otlp/collector/profiles/v1development/profiles_service.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto +// source: opentelemetry/proto/collector/profiles/v1development/profiles_service.proto -package v1experimental +package v1development import ( context "context" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - v1experimental "github.com/grafana/pyroscope/api/otlp/profiles/v1experimental" + v1development "github.com/grafana/pyroscope/api/otlp/profiles/v1development" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -34,14 +34,14 @@ type ExportProfilesServiceRequest struct { // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and // in that case this array will contain multiple elements. - ResourceProfiles []*v1experimental.ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` + ResourceProfiles []*v1development.ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` } func (m *ExportProfilesServiceRequest) Reset() { *m = ExportProfilesServiceRequest{} } func (m *ExportProfilesServiceRequest) String() string { return proto.CompactTextString(m) } func (*ExportProfilesServiceRequest) ProtoMessage() {} func (*ExportProfilesServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3d903b74e05b443d, []int{0} + return fileDescriptor_ad3943ce836e7720, []int{0} } func (m *ExportProfilesServiceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -70,7 +70,7 @@ func (m *ExportProfilesServiceRequest) XXX_DiscardUnknown() { var xxx_messageInfo_ExportProfilesServiceRequest proto.InternalMessageInfo -func (m *ExportProfilesServiceRequest) GetResourceProfiles() []*v1experimental.ResourceProfiles { +func (m *ExportProfilesServiceRequest) GetResourceProfiles() []*v1development.ResourceProfiles { if m != nil { return m.ResourceProfiles } @@ -100,7 +100,7 @@ func (m *ExportProfilesServiceResponse) Reset() { *m = ExportProfilesSer func (m *ExportProfilesServiceResponse) String() string { return proto.CompactTextString(m) } func (*ExportProfilesServiceResponse) ProtoMessage() {} func (*ExportProfilesServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3d903b74e05b443d, []int{1} + return fileDescriptor_ad3943ce836e7720, []int{1} } func (m *ExportProfilesServiceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,7 +156,7 @@ func (m *ExportProfilesPartialSuccess) Reset() { *m = ExportProfilesPart func (m *ExportProfilesPartialSuccess) String() string { return proto.CompactTextString(m) } func (*ExportProfilesPartialSuccess) ProtoMessage() {} func (*ExportProfilesPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_3d903b74e05b443d, []int{2} + return fileDescriptor_ad3943ce836e7720, []int{2} } func (m *ExportProfilesPartialSuccess) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -200,45 +200,45 @@ func (m *ExportProfilesPartialSuccess) GetErrorMessage() string { } func init() { - proto.RegisterType((*ExportProfilesServiceRequest)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesServiceRequest") - proto.RegisterType((*ExportProfilesServiceResponse)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesServiceResponse") - proto.RegisterType((*ExportProfilesPartialSuccess)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesPartialSuccess") + proto.RegisterType((*ExportProfilesServiceRequest)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest") + proto.RegisterType((*ExportProfilesServiceResponse)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse") + proto.RegisterType((*ExportProfilesPartialSuccess)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess") } func init() { - proto.RegisterFile("opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto", fileDescriptor_3d903b74e05b443d) -} - -var fileDescriptor_3d903b74e05b443d = []byte{ - // 447 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xc1, 0x6b, 0xd4, 0x40, - 0x14, 0xc6, 0x33, 0xad, 0x14, 0x9c, 0xaa, 0xd5, 0xd0, 0x43, 0x59, 0x34, 0x96, 0x78, 0x09, 0x08, - 0x13, 0xba, 0x52, 0x10, 0xc1, 0xcb, 0x4a, 0xf1, 0xa2, 0x18, 0xb2, 0xc5, 0x83, 0x97, 0x30, 0x1d, - 0x5f, 0x63, 0x4a, 0x92, 0x37, 0xce, 0x4c, 0x4a, 0x7b, 0xf5, 0xe8, 0xc9, 0x3f, 0xc2, 0x93, 0x77, - 0xff, 0x87, 0x7a, 0xeb, 0xd1, 0x93, 0xc8, 0xee, 0xd1, 0x7f, 0x42, 0x92, 0x69, 0x42, 0x13, 0x5a, - 0x0a, 0xcb, 0xde, 0x92, 0x6f, 0xf8, 0xbe, 0xef, 0xf7, 0xde, 0x30, 0xf4, 0x0d, 0x4a, 0x28, 0x0d, - 0xe4, 0x50, 0x80, 0x51, 0xa7, 0xa1, 0x54, 0x68, 0x30, 0x14, 0x98, 0xe7, 0x20, 0x0c, 0xaa, 0xfa, - 0xff, 0x30, 0xcb, 0x41, 0x87, 0xc7, 0x3b, 0x70, 0x22, 0x41, 0x65, 0x05, 0x94, 0x86, 0xe7, 0x9d, - 0x9e, 0x68, 0x50, 0xc7, 0x99, 0x00, 0xd6, 0x18, 0xdd, 0xdd, 0x5e, 0x9a, 0x15, 0x59, 0x97, 0xc6, - 0x5a, 0x17, 0xeb, 0xa7, 0x8d, 0x36, 0x53, 0x4c, 0xd1, 0x56, 0xd7, 0x5f, 0xd6, 0x37, 0x7a, 0x71, - 0x15, 0xda, 0x4d, 0x40, 0xd6, 0xeb, 0x7f, 0x25, 0xf4, 0xe1, 0xde, 0x89, 0x44, 0x65, 0xa2, 0x8b, - 0x83, 0xa9, 0x05, 0x8d, 0xe1, 0x73, 0x05, 0xda, 0xb8, 0x47, 0xf4, 0x81, 0x02, 0x8d, 0x95, 0x12, - 0x90, 0x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0x88, 0x7c, 0x78, 0x9d, 0x66, 0xe6, 0x53, 0x75, 0xc0, 0x04, - 0x16, 0x61, 0xaa, 0xf8, 0x21, 0x2f, 0x79, 0x28, 0x4f, 0x15, 0x6a, 0x81, 0x12, 0x42, 0x2e, 0xb3, - 0x10, 0x4d, 0x2e, 0x6f, 0x7e, 0xc7, 0x3f, 0x56, 0x76, 0xdf, 0x49, 0x28, 0xf7, 0x3b, 0xb0, 0xa6, - 0x80, 0xbd, 0xea, 0xc0, 0xda, 0x7e, 0xf6, 0x7e, 0x67, 0xef, 0x92, 0xef, 0x60, 0xad, 0x99, 0xe0, - 0xd9, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xdd, 0x4a, 0x63, 0x3f, 0x04, 0x00, 0x00, + proto.RegisterFile("opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", fileDescriptor_ad3943ce836e7720) +} + +var fileDescriptor_ad3943ce836e7720 = []byte{ + // 446 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3f, 0x8b, 0xd4, 0x40, + 0x18, 0xc6, 0x33, 0x77, 0x72, 0xe0, 0x9c, 0x7a, 0x1a, 0xae, 0x38, 0x16, 0x8d, 0x47, 0x6c, 0x02, + 0xc2, 0x84, 0x5b, 0x0f, 0x44, 0xb0, 0x5a, 0xff, 0x34, 0x22, 0x86, 0xac, 0x58, 0xd8, 0x84, 0xdc, + 0xdc, 0x7b, 0x31, 0x92, 0xe4, 0x1d, 0x67, 0x26, 0x8b, 0x57, 0x5a, 0xda, 0xf9, 0x1d, 0xec, 0x6c, + 0xfd, 0x10, 0x5e, 0xb9, 0xa5, 0x95, 0xc8, 0x6e, 0xe3, 0xc7, 0x90, 0x64, 0x36, 0xd1, 0x84, 0x3d, + 0x16, 0x96, 0xed, 0x92, 0x67, 0x78, 0x9e, 0xe7, 0xf7, 0xbe, 0xc3, 0xd0,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0xef, 0x81, 0x6b, 0x38, 0xfd, 0x7f, 0x61, 0xc4, 0xdb, 0xae, 0x46, 0x36, 0x07, + 0x8d, 0xd5, 0xbe, 0x47, 0xaf, 0x83, 0x94, 0x28, 0xa3, 0x1c, 0x94, 0x8a, 0x13, 0x38, 0xd8, 0x3a, + 0x24, 0xde, 0xd5, 0xf0, 0x5a, 0x2d, 0xbe, 0x34, 0xda, 0xf0, 0x07, 0xa1, 0x7b, 0xbd, 0x8d, 0xd8, + 0xdf, 0x09, 0xdd, 0x31, 0x18, 0xf6, 0x46, 0x46, 0xef, 0xde, 0xfa, 0x60, 0xbc, 0xd1, 0x4c, 0x73, + 0x7b, 0xae, 0x35, 0xfa, 0x43, 0x2e, 0x66, 0x0e, 0x99, 0xce, 0x1c, 0xf2, 0x7b, 0xe6, 0x90, 0x2f, + 0x73, 0xc7, 0x9a, 0xce, 0x1d, 0xeb, 0xe7, 0xdc, 0xb1, 0xe8, 0xc3, 0x14, 0xd7, 0xea, 0x1c, 0xed, + 0xf7, 0xea, 0x82, 0xca, 0x16, 0x90, 0xb7, 0xcf, 0x93, 0x54, 0xbf, 0x2b, 0x4f, 0x18, 0xc7, 0xdc, + 0x4f, 0x64, 0x7c, 0x16, 0x17, 0xb1, 0x2f, 0xce, 0x25, 0x2a, 0x8e, 0x02, 0xfc, 0x58, 0xa4, 0x3e, + 0xea, 0x4c, 0xac, 0x7c, 0xbf, 0xdf, 0xb6, 0x8e, 0x5f, 0x09, 0x28, 0x5e, 0xb7, 0x58, 0x75, 0x3e, + 0x7b, 0xd2, 0x62, 0x35, 0xf5, 0xec, 0xcd, 0xd1, 0xd3, 0x7f, 0xb6, 0x93, 0x9d, 0x1a, 0xff, 0xc1, + 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0xea, 0x5c, 0xc4, 0x35, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -268,7 +268,7 @@ func NewProfilesServiceClient(cc *grpc.ClientConn) ProfilesServiceClient { func (c *profilesServiceClient) Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) { out := new(ExportProfilesServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", in, out, opts...) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", in, out, opts...) if err != nil { return nil, err } @@ -304,7 +304,7 @@ func _ProfilesService_Export_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", + FullMethod: "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProfilesServiceServer).Export(ctx, req.(*ExportProfilesServiceRequest)) @@ -313,7 +313,7 @@ func _ProfilesService_Export_Handler(srv interface{}, ctx context.Context, dec f } var _ProfilesService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.profiles.v1experimental.ProfilesService", + ServiceName: "opentelemetry.proto.collector.profiles.v1development.ProfilesService", HandlerType: (*ProfilesServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -322,7 +322,7 @@ var _ProfilesService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto", + Metadata: "opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", } func (m *ExportProfilesServiceRequest) Marshal() (dAtA []byte, err error) { @@ -547,7 +547,7 @@ func (m *ExportProfilesServiceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceProfiles = append(m.ResourceProfiles, &v1experimental.ResourceProfiles{}) + m.ResourceProfiles = append(m.ResourceProfiles, &v1development.ResourceProfiles{}) if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/api/otlp/profiles/v1experimental/pprofextended.pb.go b/api/otlp/profiles/v1development/profiles.pb.go similarity index 56% rename from api/otlp/profiles/v1experimental/pprofextended.pb.go rename to api/otlp/profiles/v1development/profiles.pb.go index bd0b800a94..6994667ab8 100644 --- a/api/otlp/profiles/v1experimental/pprofextended.pb.go +++ b/api/otlp/profiles/v1development/profiles.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/profiles/v1experimental/pprofextended.proto +// source: opentelemetry/proto/profiles/v1development/profiles.proto -package v1experimental +package v1development import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - v1 "github.com/grafana/pyroscope/api/otlp/common/v1" + v11 "github.com/grafana/pyroscope/api/otlp/common/v1" + v1 "github.com/grafana/pyroscope/api/otlp/resource/v1" io "io" math "math" math_bits "math/bits" @@ -109,42 +110,223 @@ func (x AggregationTemporality) String() string { } func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{0} + return fileDescriptor_ddd0cf081a2fe76f, []int{0} +} + +// ProfilesData represents the profiles data that can be stored in persistent storage, +// OR can be embedded by other protocols that transfer OTLP profiles data but do not +// implement the OTLP protocol. +// +// The main difference between this message and collector protocol is that +// in this message there will not be any "control" or "metadata" specific to +// OTLP protocol. +// +// When new fields are added into this message, the OTLP request MUST be updated +// as well. +type ProfilesData struct { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain + // one element. Intermediary nodes that receive data from multiple origins + // typically batch the data before forwarding further and in that case this + // array will contain multiple elements. + ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` +} + +func (m *ProfilesData) Reset() { *m = ProfilesData{} } +func (m *ProfilesData) String() string { return proto.CompactTextString(m) } +func (*ProfilesData) ProtoMessage() {} +func (*ProfilesData) Descriptor() ([]byte, []int) { + return fileDescriptor_ddd0cf081a2fe76f, []int{0} +} +func (m *ProfilesData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProfilesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProfilesData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProfilesData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProfilesData.Merge(m, src) +} +func (m *ProfilesData) XXX_Size() int { + return m.Size() +} +func (m *ProfilesData) XXX_DiscardUnknown() { + xxx_messageInfo_ProfilesData.DiscardUnknown(m) } -// Indicates the semantics of the build_id field. -type BuildIdKind int32 +var xxx_messageInfo_ProfilesData proto.InternalMessageInfo -const ( - // Linker-generated build ID, stored in the ELF binary notes. - BuildIdKind_BUILD_ID_LINKER BuildIdKind = 0 - // Build ID based on the content hash of the binary. Currently no particular - // hashing approach is standardized, so a given producer needs to define it - // themselves and thus unlike BUILD_ID_LINKER this kind of hash is producer-specific. - // We may choose to provide a standardized stable hash recommendation later. - BuildIdKind_BUILD_ID_BINARY_HASH BuildIdKind = 1 -) +func (m *ProfilesData) GetResourceProfiles() []*ResourceProfiles { + if m != nil { + return m.ResourceProfiles + } + return nil +} + +// A collection of ScopeProfiles from a Resource. +type ResourceProfiles struct { + DeprecatedScopeProfiles []*ScopeProfiles `protobuf:"bytes,1000,rep,name=deprecated_scope_profiles,json=deprecatedScopeProfiles,proto3" json:"deprecated_scope_profiles,omitempty"` + // The resource for the profiles in this message. + // If this field is not set then no resource info is known. + Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` + // A list of ScopeProfiles that originate from a resource. + ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the resource data + // is recorded in. Notably, the last part of the URL path is the version number of the + // schema: http[s]://server[:port]/path/. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url + // This schema_url applies to the data in the "resource" field. It does not apply + // to the data in the "scope_profiles" field which have their own schema_url field. + SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` +} + +func (m *ResourceProfiles) Reset() { *m = ResourceProfiles{} } +func (m *ResourceProfiles) String() string { return proto.CompactTextString(m) } +func (*ResourceProfiles) ProtoMessage() {} +func (*ResourceProfiles) Descriptor() ([]byte, []int) { + return fileDescriptor_ddd0cf081a2fe76f, []int{1} +} +func (m *ResourceProfiles) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceProfiles.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResourceProfiles) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceProfiles.Merge(m, src) +} +func (m *ResourceProfiles) XXX_Size() int { + return m.Size() +} +func (m *ResourceProfiles) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceProfiles.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceProfiles proto.InternalMessageInfo + +func (m *ResourceProfiles) GetDeprecatedScopeProfiles() []*ScopeProfiles { + if m != nil { + return m.DeprecatedScopeProfiles + } + return nil +} + +func (m *ResourceProfiles) GetResource() v1.Resource { + if m != nil { + return m.Resource + } + return v1.Resource{} +} -var BuildIdKind_name = map[int32]string{ - 0: "BUILD_ID_LINKER", - 1: "BUILD_ID_BINARY_HASH", +func (m *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles { + if m != nil { + return m.ScopeProfiles + } + return nil +} + +func (m *ResourceProfiles) GetSchemaUrl() string { + if m != nil { + return m.SchemaUrl + } + return "" +} + +// A collection of Profiles produced by an InstrumentationScope. +type ScopeProfiles struct { + // The instrumentation scope information for the profiles in this message. + // Semantically when InstrumentationScope isn't set, it is equivalent with + // an empty instrumentation scope name (unknown). + Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` + // A list of Profiles that originate from an instrumentation scope. + Profiles []*Profile `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the profile data + // is recorded in. Notably, the last part of the URL path is the version number of the + // schema: http[s]://server[:port]/path/. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url + // This schema_url applies to all profiles in the "profiles" field. + SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` +} + +func (m *ScopeProfiles) Reset() { *m = ScopeProfiles{} } +func (m *ScopeProfiles) String() string { return proto.CompactTextString(m) } +func (*ScopeProfiles) ProtoMessage() {} +func (*ScopeProfiles) Descriptor() ([]byte, []int) { + return fileDescriptor_ddd0cf081a2fe76f, []int{2} +} +func (m *ScopeProfiles) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ScopeProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ScopeProfiles.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ScopeProfiles) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopeProfiles.Merge(m, src) +} +func (m *ScopeProfiles) XXX_Size() int { + return m.Size() } +func (m *ScopeProfiles) XXX_DiscardUnknown() { + xxx_messageInfo_ScopeProfiles.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopeProfiles proto.InternalMessageInfo -var BuildIdKind_value = map[string]int32{ - "BUILD_ID_LINKER": 0, - "BUILD_ID_BINARY_HASH": 1, +func (m *ScopeProfiles) GetScope() v11.InstrumentationScope { + if m != nil { + return m.Scope + } + return v11.InstrumentationScope{} } -func (x BuildIdKind) String() string { - return proto.EnumName(BuildIdKind_name, int32(x)) +func (m *ScopeProfiles) GetProfiles() []*Profile { + if m != nil { + return m.Profiles + } + return nil } -func (BuildIdKind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{1} +func (m *ScopeProfiles) GetSchemaUrl() string { + if m != nil { + return m.SchemaUrl + } + return "" } // Represents a complete profile, including sample types, samples, // mappings to binaries, locations, functions, string table, and additional metadata. +// It modifies and annotates pprof Profile with OpenTelemetry specific fields. +// +// Note that whilst fields in this message retain the name and field id from pprof in most cases +// for ease of understanding data migration, it is not intended that pprof:Profile and +// OpenTelemetry:Profile encoding be wire compatible. type Profile struct { // A description of the samples associated with each Sample.value. // For a cpu profile this might be: @@ -159,53 +341,81 @@ type Profile struct { Sample []*Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample,omitempty"` // Mapping from address ranges to the image/binary/library mapped // into that address range. mapping[0] will be the main binary. - Mapping []*Mapping `protobuf:"bytes,3,rep,name=mapping,proto3" json:"mapping,omitempty"` + // If multiple binaries contribute to the Profile and no main + // binary can be identified, mapping[0] has no special meaning. + MappingTable []*Mapping `protobuf:"bytes,3,rep,name=mapping_table,json=mappingTable,proto3" json:"mapping_table,omitempty"` // Locations referenced by samples via location_indices. - Location []*Location `protobuf:"bytes,4,rep,name=location,proto3" json:"location,omitempty"` + LocationTable []*Location `protobuf:"bytes,4,rep,name=location_table,json=locationTable,proto3" json:"location_table,omitempty"` // Array of locations referenced by samples. - LocationIndices []int64 `protobuf:"varint,15,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` + LocationIndices []int32 `protobuf:"varint,5,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` // Functions referenced by locations. - Function []*Function `protobuf:"bytes,5,rep,name=function,proto3" json:"function,omitempty"` + FunctionTable []*Function `protobuf:"bytes,6,rep,name=function_table,json=functionTable,proto3" json:"function_table,omitempty"` // Lookup table for attributes. - AttributeTable []v1.KeyValue `protobuf:"bytes,16,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` + AttributeTable []v11.KeyValue `protobuf:"bytes,7,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` // Represents a mapping between Attribute Keys and Units. - AttributeUnits []*AttributeUnit `protobuf:"bytes,17,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units,omitempty"` + AttributeUnits []*AttributeUnit `protobuf:"bytes,8,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units,omitempty"` // Lookup table for links. - LinkTable []*Link `protobuf:"bytes,18,rep,name=link_table,json=linkTable,proto3" json:"link_table,omitempty"` + LinkTable []*Link `protobuf:"bytes,9,rep,name=link_table,json=linkTable,proto3" json:"link_table,omitempty"` // A common table for strings referenced by various messages. // string_table[0] must always be "". - StringTable []string `protobuf:"bytes,6,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` - // frames with Function.function_name fully matching the following - // regexp will be dropped from the samples, along with their successors. - DropFrames int64 `protobuf:"varint,7,opt,name=drop_frames,json=dropFrames,proto3" json:"drop_frames,omitempty"` - // frames with Function.function_name fully matching the following - // regexp will be kept, even if it matches drop_frames. - KeepFrames int64 `protobuf:"varint,8,opt,name=keep_frames,json=keepFrames,proto3" json:"keep_frames,omitempty"` + StringTable []string `protobuf:"bytes,10,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` // Time of collection (UTC) represented as nanoseconds past the epoch. - TimeNanos int64 `protobuf:"varint,9,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` + TimeNanos int64 `protobuf:"varint,11,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` // Duration of the profile, if a duration makes sense. - DurationNanos int64 `protobuf:"varint,10,opt,name=duration_nanos,json=durationNanos,proto3" json:"duration_nanos,omitempty"` + DurationNanos int64 `protobuf:"varint,12,opt,name=duration_nanos,json=durationNanos,proto3" json:"duration_nanos,omitempty"` // The kind of events between sampled occurrences. // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] - PeriodType *ValueType `protobuf:"bytes,11,opt,name=period_type,json=periodType,proto3" json:"period_type,omitempty"` + PeriodType *ValueType `protobuf:"bytes,13,opt,name=period_type,json=periodType,proto3" json:"period_type,omitempty"` // The number of events between sampled occurrences. - Period int64 `protobuf:"varint,12,opt,name=period,proto3" json:"period,omitempty"` + Period int64 `protobuf:"varint,14,opt,name=period,proto3" json:"period,omitempty"` // Free-form text associated with the profile. The text is displayed as is // to the user by the tools that read profiles (e.g. by pprof). This field // should not be used to store any machine-readable information, it is only // for human-friendly content. The profile must stay functional if this field // is cleaned. - Comment []int64 `protobuf:"varint,13,rep,packed,name=comment,proto3" json:"comment,omitempty"` + CommentStrindices []int32 `protobuf:"varint,15,rep,packed,name=comment_strindices,json=commentStrindices,proto3" json:"comment_strindices,omitempty"` // Index into the string table of the type of the preferred sample // value. If unset, clients should default to the last sample value. - DefaultSampleType int64 `protobuf:"varint,14,opt,name=default_sample_type,json=defaultSampleType,proto3" json:"default_sample_type,omitempty"` + DefaultSampleTypeStrindex int32 `protobuf:"varint,16,opt,name=default_sample_type_strindex,json=defaultSampleTypeStrindex,proto3" json:"default_sample_type_strindex,omitempty"` + // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with + // all zeroes is considered invalid. + // + // This field is required. + ProfileId []byte `protobuf:"bytes,17,opt,name=profile_id,json=profileId,proto3" json:"profile_id,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. + DroppedAttributesCount uint32 `protobuf:"varint,19,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + // Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] + OriginalPayloadFormat string `protobuf:"bytes,20,opt,name=original_payload_format,json=originalPayloadFormat,proto3" json:"original_payload_format,omitempty"` + // Original payload can be stored in this field. This can be useful for users who want to get the original payload. + // Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. + // Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. + // If the original payload is in pprof format, it SHOULD not be included in this field. + // The field is optional, however if it is present then equivalent converted data should be populated in other fields + // of this message as far as is practicable. + OriginalPayload []byte `protobuf:"bytes,21,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"` + // References to attributes in attribute_table. [optional] + // It is a collection of key/value pairs. Note, global attributes + // like server name can be set using the resource API. Examples of attributes: + // + // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + // "/http/server_latency": 300 + // "abc.com/myattribute": true + // "abc.com/score": 10.239 + // + // The OpenTelemetry API specification further restricts the allowed value types: + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + AttributeIndices []int32 `protobuf:"varint,22,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` } func (m *Profile) Reset() { *m = Profile{} } func (m *Profile) String() string { return proto.CompactTextString(m) } func (*Profile) ProtoMessage() {} func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{0} + return fileDescriptor_ddd0cf081a2fe76f, []int{3} } func (m *Profile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,35 +458,35 @@ func (m *Profile) GetSample() []*Sample { return nil } -func (m *Profile) GetMapping() []*Mapping { +func (m *Profile) GetMappingTable() []*Mapping { if m != nil { - return m.Mapping + return m.MappingTable } return nil } -func (m *Profile) GetLocation() []*Location { +func (m *Profile) GetLocationTable() []*Location { if m != nil { - return m.Location + return m.LocationTable } return nil } -func (m *Profile) GetLocationIndices() []int64 { +func (m *Profile) GetLocationIndices() []int32 { if m != nil { return m.LocationIndices } return nil } -func (m *Profile) GetFunction() []*Function { +func (m *Profile) GetFunctionTable() []*Function { if m != nil { - return m.Function + return m.FunctionTable } return nil } -func (m *Profile) GetAttributeTable() []v1.KeyValue { +func (m *Profile) GetAttributeTable() []v11.KeyValue { if m != nil { return m.AttributeTable } @@ -304,75 +514,96 @@ func (m *Profile) GetStringTable() []string { return nil } -func (m *Profile) GetDropFrames() int64 { +func (m *Profile) GetTimeNanos() int64 { if m != nil { - return m.DropFrames + return m.TimeNanos } return 0 } -func (m *Profile) GetKeepFrames() int64 { +func (m *Profile) GetDurationNanos() int64 { if m != nil { - return m.KeepFrames + return m.DurationNanos } return 0 } -func (m *Profile) GetTimeNanos() int64 { +func (m *Profile) GetPeriodType() *ValueType { if m != nil { - return m.TimeNanos + return m.PeriodType } - return 0 + return nil } -func (m *Profile) GetDurationNanos() int64 { +func (m *Profile) GetPeriod() int64 { if m != nil { - return m.DurationNanos + return m.Period } return 0 } -func (m *Profile) GetPeriodType() *ValueType { +func (m *Profile) GetCommentStrindices() []int32 { if m != nil { - return m.PeriodType + return m.CommentStrindices } return nil } -func (m *Profile) GetPeriod() int64 { +func (m *Profile) GetDefaultSampleTypeStrindex() int32 { if m != nil { - return m.Period + return m.DefaultSampleTypeStrindex } return 0 } -func (m *Profile) GetComment() []int64 { +func (m *Profile) GetProfileId() []byte { if m != nil { - return m.Comment + return m.ProfileId } return nil } -func (m *Profile) GetDefaultSampleType() int64 { +func (m *Profile) GetDroppedAttributesCount() uint32 { if m != nil { - return m.DefaultSampleType + return m.DroppedAttributesCount } return 0 } +func (m *Profile) GetOriginalPayloadFormat() string { + if m != nil { + return m.OriginalPayloadFormat + } + return "" +} + +func (m *Profile) GetOriginalPayload() []byte { + if m != nil { + return m.OriginalPayload + } + return nil +} + +func (m *Profile) GetAttributeIndices() []int32 { + if m != nil { + return m.AttributeIndices + } + return nil +} + // Represents a mapping between Attribute Keys and Units. type AttributeUnit struct { // Index into string table. - AttributeKey int64 `protobuf:"varint,1,opt,name=attribute_key,json=attributeKey,proto3" json:"attribute_key,omitempty"` + AttributeKeyStrindex int32 `protobuf:"varint,1,opt,name=attribute_key_strindex,json=attributeKeyStrindex,proto3" json:"attribute_key_strindex,omitempty"` // Index into string table. - Unit int64 `protobuf:"varint,2,opt,name=unit,proto3" json:"unit,omitempty"` + UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"` } func (m *AttributeUnit) Reset() { *m = AttributeUnit{} } func (m *AttributeUnit) String() string { return proto.CompactTextString(m) } func (*AttributeUnit) ProtoMessage() {} func (*AttributeUnit) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{1} + return fileDescriptor_ddd0cf081a2fe76f, []int{4} } func (m *AttributeUnit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,16 +632,16 @@ func (m *AttributeUnit) XXX_DiscardUnknown() { var xxx_messageInfo_AttributeUnit proto.InternalMessageInfo -func (m *AttributeUnit) GetAttributeKey() int64 { +func (m *AttributeUnit) GetAttributeKeyStrindex() int32 { if m != nil { - return m.AttributeKey + return m.AttributeKeyStrindex } return 0 } -func (m *AttributeUnit) GetUnit() int64 { +func (m *AttributeUnit) GetUnitStrindex() int32 { if m != nil { - return m.Unit + return m.UnitStrindex } return 0 } @@ -429,7 +660,7 @@ func (m *Link) Reset() { *m = Link{} } func (m *Link) String() string { return proto.CompactTextString(m) } func (*Link) ProtoMessage() {} func (*Link) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{2} + return fileDescriptor_ddd0cf081a2fe76f, []int{5} } func (m *Link) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -474,16 +705,16 @@ func (m *Link) GetSpanId() []byte { // ValueType describes the type and units of a value, with an optional aggregation temporality. type ValueType struct { - Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` - Unit int64 `protobuf:"varint,2,opt,name=unit,proto3" json:"unit,omitempty"` - AggregationTemporality AggregationTemporality `protobuf:"varint,3,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.profiles.v1experimental.AggregationTemporality" json:"aggregation_temporality,omitempty"` + TypeStrindex int32 `protobuf:"varint,1,opt,name=type_strindex,json=typeStrindex,proto3" json:"type_strindex,omitempty"` + UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"` + AggregationTemporality AggregationTemporality `protobuf:"varint,3,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.profiles.v1development.AggregationTemporality" json:"aggregation_temporality,omitempty"` } func (m *ValueType) Reset() { *m = ValueType{} } func (m *ValueType) String() string { return proto.CompactTextString(m) } func (*ValueType) ProtoMessage() {} func (*ValueType) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{3} + return fileDescriptor_ddd0cf081a2fe76f, []int{6} } func (m *ValueType) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -512,16 +743,16 @@ func (m *ValueType) XXX_DiscardUnknown() { var xxx_messageInfo_ValueType proto.InternalMessageInfo -func (m *ValueType) GetType() int64 { +func (m *ValueType) GetTypeStrindex() int32 { if m != nil { - return m.Type + return m.TypeStrindex } return 0 } -func (m *ValueType) GetUnit() int64 { +func (m *ValueType) GetUnitStrindex() int32 { if m != nil { - return m.Unit + return m.UnitStrindex } return 0 } @@ -538,48 +769,35 @@ func (m *ValueType) GetAggregationTemporality() AggregationTemporality { // augmented with auxiliary information like the thread-id, some // indicator of a higher level request being handled etc. type Sample struct { - // The indices recorded here correspond to locations in Profile.location. - // The leaf is at location_index[0]. [deprecated, superseded by locations_start_index / locations_length] - LocationIndex []uint64 `protobuf:"varint,1,rep,packed,name=location_index,json=locationIndex,proto3" json:"location_index,omitempty"` - // locations_start_index along with locations_length refers to to a slice of locations in Profile.location. + // locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices. + LocationsStartIndex int32 `protobuf:"varint,1,opt,name=locations_start_index,json=locationsStartIndex,proto3" json:"locations_start_index,omitempty"` + // locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices. // Supersedes location_index. - LocationsStartIndex uint64 `protobuf:"varint,7,opt,name=locations_start_index,json=locationsStartIndex,proto3" json:"locations_start_index,omitempty"` - // locations_length along with locations_start_index refers to a slice of locations in Profile.location. - // Supersedes location_index. - LocationsLength uint64 `protobuf:"varint,8,opt,name=locations_length,json=locationsLength,proto3" json:"locations_length,omitempty"` - // A 128bit id that uniquely identifies this stacktrace, globally. Index into string table. [optional] - StacktraceIdIndex uint32 `protobuf:"varint,9,opt,name=stacktrace_id_index,json=stacktraceIdIndex,proto3" json:"stacktrace_id_index,omitempty"` + LocationsLength int32 `protobuf:"varint,2,opt,name=locations_length,json=locationsLength,proto3" json:"locations_length,omitempty"` // The type and unit of each value is defined by the corresponding // entry in Profile.sample_type. All samples must have the same // number of values, the same as the length of Profile.sample_type. // When aggregating multiple samples into a single sample, the // result has a list of values that is the element-wise sum of the // lists of the originals. - Value []int64 `protobuf:"varint,2,rep,packed,name=value,proto3" json:"value,omitempty"` - // label includes additional context for this sample. It can include - // things like a thread id, allocation size, etc. - // - // NOTE: While possible, having multiple values for the same label key is - // strongly discouraged and should never be used. Most tools (e.g. pprof) do - // not have good (or any) support for multi-value labels. And an even more - // discouraged case is having a string label and a numeric label of the same - // name on a sample. Again, possible to express, but should not be used. - // [deprecated, superseded by attributes] - Label []*Label `protobuf:"bytes,3,rep,name=label,proto3" json:"label,omitempty"` + Value []int64 `protobuf:"varint,3,rep,packed,name=value,proto3" json:"value,omitempty"` // References to attributes in Profile.attribute_table. [optional] - Attributes []uint64 `protobuf:"varint,10,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + AttributeIndices []int32 `protobuf:"varint,4,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` // Reference to link in Profile.link_table. [optional] - Link uint64 `protobuf:"varint,12,opt,name=link,proto3" json:"link,omitempty"` + // + // Types that are valid to be assigned to LinkIndex_: + // *Sample_LinkIndex + LinkIndex_ isSample_LinkIndex_ `protobuf_oneof:"link_index_"` // Timestamps associated with Sample represented in nanoseconds. These timestamps are expected // to fall within the Profile's time range. [optional] - TimestampsUnixNano []uint64 `protobuf:"varint,13,rep,packed,name=timestamps_unix_nano,json=timestampsUnixNano,proto3" json:"timestamps_unix_nano,omitempty"` + TimestampsUnixNano []uint64 `protobuf:"varint,6,rep,packed,name=timestamps_unix_nano,json=timestampsUnixNano,proto3" json:"timestamps_unix_nano,omitempty"` } func (m *Sample) Reset() { *m = Sample{} } func (m *Sample) String() string { return proto.CompactTextString(m) } func (*Sample) ProtoMessage() {} func (*Sample) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{4} + return fileDescriptor_ddd0cf081a2fe76f, []int{7} } func (m *Sample) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -608,34 +826,39 @@ func (m *Sample) XXX_DiscardUnknown() { var xxx_messageInfo_Sample proto.InternalMessageInfo -func (m *Sample) GetLocationIndex() []uint64 { +type isSample_LinkIndex_ interface { + isSample_LinkIndex_() + MarshalTo([]byte) (int, error) + Size() int +} + +type Sample_LinkIndex struct { + LinkIndex int32 `protobuf:"varint,5,opt,name=link_index,json=linkIndex,proto3,oneof" json:"link_index,omitempty"` +} + +func (*Sample_LinkIndex) isSample_LinkIndex_() {} + +func (m *Sample) GetLinkIndex_() isSample_LinkIndex_ { if m != nil { - return m.LocationIndex + return m.LinkIndex_ } return nil } -func (m *Sample) GetLocationsStartIndex() uint64 { +func (m *Sample) GetLocationsStartIndex() int32 { if m != nil { return m.LocationsStartIndex } return 0 } -func (m *Sample) GetLocationsLength() uint64 { +func (m *Sample) GetLocationsLength() int32 { if m != nil { return m.LocationsLength } return 0 } -func (m *Sample) GetStacktraceIdIndex() uint32 { - if m != nil { - return m.StacktraceIdIndex - } - return 0 -} - func (m *Sample) GetValue() []int64 { if m != nil { return m.Value @@ -643,23 +866,16 @@ func (m *Sample) GetValue() []int64 { return nil } -func (m *Sample) GetLabel() []*Label { - if m != nil { - return m.Label - } - return nil -} - -func (m *Sample) GetAttributes() []uint64 { +func (m *Sample) GetAttributeIndices() []int32 { if m != nil { - return m.Attributes + return m.AttributeIndices } return nil } -func (m *Sample) GetLink() uint64 { - if m != nil { - return m.Link +func (m *Sample) GetLinkIndex() int32 { + if x, ok := m.GetLinkIndex_().(*Sample_LinkIndex); ok { + return x.LinkIndex } return 0 } @@ -671,119 +887,40 @@ func (m *Sample) GetTimestampsUnixNano() []uint64 { return nil } -// Provides additional context for a sample, -// such as thread ID or allocation size, with optional units. [deprecated] -type Label struct { - Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` - // At most one of the following must be present - Str int64 `protobuf:"varint,2,opt,name=str,proto3" json:"str,omitempty"` - Num int64 `protobuf:"varint,3,opt,name=num,proto3" json:"num,omitempty"` - // Should only be present when num is present. - // Specifies the units of num. - // Use arbitrary string (for example, "requests") as a custom count unit. - // If no unit is specified, consumer may apply heuristic to deduce the unit. - // Consumers may also interpret units like "bytes" and "kilobytes" as memory - // units and units like "seconds" and "nanoseconds" as time units, - // and apply appropriate unit conversions to these. - NumUnit int64 `protobuf:"varint,4,opt,name=num_unit,json=numUnit,proto3" json:"num_unit,omitempty"` -} - -func (m *Label) Reset() { *m = Label{} } -func (m *Label) String() string { return proto.CompactTextString(m) } -func (*Label) ProtoMessage() {} -func (*Label) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{5} -} -func (m *Label) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Label) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Label.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Label) XXX_Merge(src proto.Message) { - xxx_messageInfo_Label.Merge(m, src) -} -func (m *Label) XXX_Size() int { - return m.Size() -} -func (m *Label) XXX_DiscardUnknown() { - xxx_messageInfo_Label.DiscardUnknown(m) -} - -var xxx_messageInfo_Label proto.InternalMessageInfo - -func (m *Label) GetKey() int64 { - if m != nil { - return m.Key - } - return 0 -} - -func (m *Label) GetStr() int64 { - if m != nil { - return m.Str - } - return 0 -} - -func (m *Label) GetNum() int64 { - if m != nil { - return m.Num - } - return 0 -} - -func (m *Label) GetNumUnit() int64 { - if m != nil { - return m.NumUnit +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Sample) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Sample_LinkIndex)(nil), } - return 0 } // Describes the mapping of a binary in memory, including its address range, // file offset, and metadata like build ID type Mapping struct { - // Unique nonzero id for the mapping. [deprecated] - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Address at which the binary (or DLL) is loaded into memory. - MemoryStart uint64 `protobuf:"varint,2,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"` + MemoryStart uint64 `protobuf:"varint,1,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"` // The limit of the address range occupied by this mapping. - MemoryLimit uint64 `protobuf:"varint,3,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` + MemoryLimit uint64 `protobuf:"varint,2,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` // Offset in the binary that corresponds to the first mapped address. - FileOffset uint64 `protobuf:"varint,4,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"` + FileOffset uint64 `protobuf:"varint,3,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"` // The object this entry is loaded from. This can be a filename on // disk for the main binary and shared libraries, or virtual // abstractions like "[vdso]". - Filename int64 `protobuf:"varint,5,opt,name=filename,proto3" json:"filename,omitempty"` - // A string that uniquely identifies a particular program version - // with high probability. E.g., for binaries generated by GNU tools, - // it could be the contents of the .note.gnu.build-id field. - BuildId int64 `protobuf:"varint,6,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` - // Specifies the kind of build id. See BuildIdKind enum for more details [optional] - BuildIdKind BuildIdKind `protobuf:"varint,11,opt,name=build_id_kind,json=buildIdKind,proto3,enum=opentelemetry.proto.profiles.v1experimental.BuildIdKind" json:"build_id_kind,omitempty"` + FilenameStrindex int32 `protobuf:"varint,4,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` // References to attributes in Profile.attribute_table. [optional] - Attributes []uint64 `protobuf:"varint,12,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` // The following fields indicate the resolution of symbolic info. - HasFunctions bool `protobuf:"varint,7,opt,name=has_functions,json=hasFunctions,proto3" json:"has_functions,omitempty"` - HasFilenames bool `protobuf:"varint,8,opt,name=has_filenames,json=hasFilenames,proto3" json:"has_filenames,omitempty"` - HasLineNumbers bool `protobuf:"varint,9,opt,name=has_line_numbers,json=hasLineNumbers,proto3" json:"has_line_numbers,omitempty"` - HasInlineFrames bool `protobuf:"varint,10,opt,name=has_inline_frames,json=hasInlineFrames,proto3" json:"has_inline_frames,omitempty"` + HasFunctions bool `protobuf:"varint,6,opt,name=has_functions,json=hasFunctions,proto3" json:"has_functions,omitempty"` + HasFilenames bool `protobuf:"varint,7,opt,name=has_filenames,json=hasFilenames,proto3" json:"has_filenames,omitempty"` + HasLineNumbers bool `protobuf:"varint,8,opt,name=has_line_numbers,json=hasLineNumbers,proto3" json:"has_line_numbers,omitempty"` + HasInlineFrames bool `protobuf:"varint,9,opt,name=has_inline_frames,json=hasInlineFrames,proto3" json:"has_inline_frames,omitempty"` } func (m *Mapping) Reset() { *m = Mapping{} } func (m *Mapping) String() string { return proto.CompactTextString(m) } func (*Mapping) ProtoMessage() {} func (*Mapping) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{6} + return fileDescriptor_ddd0cf081a2fe76f, []int{8} } func (m *Mapping) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -812,13 +949,6 @@ func (m *Mapping) XXX_DiscardUnknown() { var xxx_messageInfo_Mapping proto.InternalMessageInfo -func (m *Mapping) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - func (m *Mapping) GetMemoryStart() uint64 { if m != nil { return m.MemoryStart @@ -840,30 +970,16 @@ func (m *Mapping) GetFileOffset() uint64 { return 0 } -func (m *Mapping) GetFilename() int64 { - if m != nil { - return m.Filename - } - return 0 -} - -func (m *Mapping) GetBuildId() int64 { +func (m *Mapping) GetFilenameStrindex() int32 { if m != nil { - return m.BuildId + return m.FilenameStrindex } return 0 } -func (m *Mapping) GetBuildIdKind() BuildIdKind { +func (m *Mapping) GetAttributeIndices() []int32 { if m != nil { - return m.BuildIdKind - } - return BuildIdKind_BUILD_ID_LINKER -} - -func (m *Mapping) GetAttributes() []uint64 { - if m != nil { - return m.Attributes + return m.AttributeIndices } return nil } @@ -898,19 +1014,19 @@ func (m *Mapping) GetHasInlineFrames() bool { // Describes function and line table debug information. type Location struct { - // Unique nonzero id for the location. A profile could use - // instruction addresses or any integer sequence as ids. [deprecated] - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // The index of the corresponding profile.Mapping for this location. + // Reference to mapping in Profile.mapping_table. // It can be unset if the mapping is unknown or not applicable for // this profile type. - MappingIndex uint64 `protobuf:"varint,2,opt,name=mapping_index,json=mappingIndex,proto3" json:"mapping_index,omitempty"` + // + // Types that are valid to be assigned to MappingIndex_: + // *Location_MappingIndex + MappingIndex_ isLocation_MappingIndex_ `protobuf_oneof:"mapping_index_"` // The instruction address for this location, if available. It // should be within [Mapping.memory_start...Mapping.memory_limit] // for the corresponding mapping. A non-leaf address may be in the // middle of a call instruction. It is up to display tools to find // the beginning of the instruction if necessary. - Address uint64 `protobuf:"varint,3,opt,name=address,proto3" json:"address,omitempty"` + Address uint64 `protobuf:"varint,2,opt,name=address,proto3" json:"address,omitempty"` // Multiple line indicates this location has inlined functions, // where the last entry represents the caller into which the // preceding entries were inlined. @@ -918,24 +1034,22 @@ type Location struct { // E.g., if memcpy() is inlined into printf: // line[0].function_name == "memcpy" // line[1].function_name == "printf" - Line []*Line `protobuf:"bytes,4,rep,name=line,proto3" json:"line,omitempty"` + Line []*Line `protobuf:"bytes,3,rep,name=line,proto3" json:"line,omitempty"` // Provides an indication that multiple symbols map to this location's // address, for example due to identical code folding by the linker. In that // case the line information above represents one of the multiple // symbols. This field must be recomputed when the symbolization state of the // profile changes. - IsFolded bool `protobuf:"varint,5,opt,name=is_folded,json=isFolded,proto3" json:"is_folded,omitempty"` - // Type of frame (e.g. kernel, native, python, hotspot, php). Index into string table. - TypeIndex uint32 `protobuf:"varint,6,opt,name=type_index,json=typeIndex,proto3" json:"type_index,omitempty"` + IsFolded bool `protobuf:"varint,4,opt,name=is_folded,json=isFolded,proto3" json:"is_folded,omitempty"` // References to attributes in Profile.attribute_table. [optional] - Attributes []uint64 `protobuf:"varint,7,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` } func (m *Location) Reset() { *m = Location{} } func (m *Location) String() string { return proto.CompactTextString(m) } func (*Location) ProtoMessage() {} func (*Location) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{7} + return fileDescriptor_ddd0cf081a2fe76f, []int{9} } func (m *Location) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -964,16 +1078,28 @@ func (m *Location) XXX_DiscardUnknown() { var xxx_messageInfo_Location proto.InternalMessageInfo -func (m *Location) GetId() uint64 { +type isLocation_MappingIndex_ interface { + isLocation_MappingIndex_() + MarshalTo([]byte) (int, error) + Size() int +} + +type Location_MappingIndex struct { + MappingIndex int32 `protobuf:"varint,1,opt,name=mapping_index,json=mappingIndex,proto3,oneof" json:"mapping_index,omitempty"` +} + +func (*Location_MappingIndex) isLocation_MappingIndex_() {} + +func (m *Location) GetMappingIndex_() isLocation_MappingIndex_ { if m != nil { - return m.Id + return m.MappingIndex_ } - return 0 + return nil } -func (m *Location) GetMappingIndex() uint64 { - if m != nil { - return m.MappingIndex +func (m *Location) GetMappingIndex() int32 { + if x, ok := m.GetMappingIndex_().(*Location_MappingIndex); ok { + return x.MappingIndex } return 0 } @@ -999,24 +1125,24 @@ func (m *Location) GetIsFolded() bool { return false } -func (m *Location) GetTypeIndex() uint32 { +func (m *Location) GetAttributeIndices() []int32 { if m != nil { - return m.TypeIndex + return m.AttributeIndices } - return 0 + return nil } -func (m *Location) GetAttributes() []uint64 { - if m != nil { - return m.Attributes +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Location) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Location_MappingIndex)(nil), } - return nil } // Details a specific line in a source code, linked to a function. type Line struct { - // The index of the corresponding profile.Function for this line. - FunctionIndex uint64 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"` + // Reference to function in Profile.function_table. + FunctionIndex int32 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"` // Line number in source code. Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` // Column number in source code. @@ -1027,7 +1153,7 @@ func (m *Line) Reset() { *m = Line{} } func (m *Line) String() string { return proto.CompactTextString(m) } func (*Line) ProtoMessage() {} func (*Line) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{8} + return fileDescriptor_ddd0cf081a2fe76f, []int{10} } func (m *Line) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1056,7 +1182,7 @@ func (m *Line) XXX_DiscardUnknown() { var xxx_messageInfo_Line proto.InternalMessageInfo -func (m *Line) GetFunctionIndex() uint64 { +func (m *Line) GetFunctionIndex() int32 { if m != nil { return m.FunctionIndex } @@ -1080,24 +1206,22 @@ func (m *Line) GetColumn() int64 { // Describes a function, including its human-readable name, system name, // source file, and starting line number in the source. type Function struct { - // Unique nonzero id for the function. [deprecated] - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Name of the function, in human-readable form if available. - Name int64 `protobuf:"varint,2,opt,name=name,proto3" json:"name,omitempty"` + NameStrindex int32 `protobuf:"varint,1,opt,name=name_strindex,json=nameStrindex,proto3" json:"name_strindex,omitempty"` // Name of the function, as identified by the system. // For instance, it can be a C++ mangled name. - SystemName int64 `protobuf:"varint,3,opt,name=system_name,json=systemName,proto3" json:"system_name,omitempty"` + SystemNameStrindex int32 `protobuf:"varint,2,opt,name=system_name_strindex,json=systemNameStrindex,proto3" json:"system_name_strindex,omitempty"` // Source file containing the function. - Filename int64 `protobuf:"varint,4,opt,name=filename,proto3" json:"filename,omitempty"` + FilenameStrindex int32 `protobuf:"varint,3,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` // Line number in source file. - StartLine int64 `protobuf:"varint,5,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` + StartLine int64 `protobuf:"varint,4,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` } func (m *Function) Reset() { *m = Function{} } func (m *Function) String() string { return proto.CompactTextString(m) } func (*Function) ProtoMessage() {} func (*Function) Descriptor() ([]byte, []int) { - return fileDescriptor_05f9ce3fdbeb046f, []int{9} + return fileDescriptor_ddd0cf081a2fe76f, []int{11} } func (m *Function) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1126,30 +1250,23 @@ func (m *Function) XXX_DiscardUnknown() { var xxx_messageInfo_Function proto.InternalMessageInfo -func (m *Function) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *Function) GetName() int64 { +func (m *Function) GetNameStrindex() int32 { if m != nil { - return m.Name + return m.NameStrindex } return 0 } -func (m *Function) GetSystemName() int64 { +func (m *Function) GetSystemNameStrindex() int32 { if m != nil { - return m.SystemName + return m.SystemNameStrindex } return 0 } -func (m *Function) GetFilename() int64 { +func (m *Function) GetFilenameStrindex() int32 { if m != nil { - return m.Filename + return m.FilenameStrindex } return 0 } @@ -1162,120 +1279,127 @@ func (m *Function) GetStartLine() int64 { } func init() { - proto.RegisterEnum("opentelemetry.proto.profiles.v1experimental.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) - proto.RegisterEnum("opentelemetry.proto.profiles.v1experimental.BuildIdKind", BuildIdKind_name, BuildIdKind_value) - proto.RegisterType((*Profile)(nil), "opentelemetry.proto.profiles.v1experimental.Profile") - proto.RegisterType((*AttributeUnit)(nil), "opentelemetry.proto.profiles.v1experimental.AttributeUnit") - proto.RegisterType((*Link)(nil), "opentelemetry.proto.profiles.v1experimental.Link") - proto.RegisterType((*ValueType)(nil), "opentelemetry.proto.profiles.v1experimental.ValueType") - proto.RegisterType((*Sample)(nil), "opentelemetry.proto.profiles.v1experimental.Sample") - proto.RegisterType((*Label)(nil), "opentelemetry.proto.profiles.v1experimental.Label") - proto.RegisterType((*Mapping)(nil), "opentelemetry.proto.profiles.v1experimental.Mapping") - proto.RegisterType((*Location)(nil), "opentelemetry.proto.profiles.v1experimental.Location") - proto.RegisterType((*Line)(nil), "opentelemetry.proto.profiles.v1experimental.Line") - proto.RegisterType((*Function)(nil), "opentelemetry.proto.profiles.v1experimental.Function") + proto.RegisterEnum("opentelemetry.proto.profiles.v1development.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) + proto.RegisterType((*ProfilesData)(nil), "opentelemetry.proto.profiles.v1development.ProfilesData") + proto.RegisterType((*ResourceProfiles)(nil), "opentelemetry.proto.profiles.v1development.ResourceProfiles") + proto.RegisterType((*ScopeProfiles)(nil), "opentelemetry.proto.profiles.v1development.ScopeProfiles") + proto.RegisterType((*Profile)(nil), "opentelemetry.proto.profiles.v1development.Profile") + proto.RegisterType((*AttributeUnit)(nil), "opentelemetry.proto.profiles.v1development.AttributeUnit") + proto.RegisterType((*Link)(nil), "opentelemetry.proto.profiles.v1development.Link") + proto.RegisterType((*ValueType)(nil), "opentelemetry.proto.profiles.v1development.ValueType") + proto.RegisterType((*Sample)(nil), "opentelemetry.proto.profiles.v1development.Sample") + proto.RegisterType((*Mapping)(nil), "opentelemetry.proto.profiles.v1development.Mapping") + proto.RegisterType((*Location)(nil), "opentelemetry.proto.profiles.v1development.Location") + proto.RegisterType((*Line)(nil), "opentelemetry.proto.profiles.v1development.Line") + proto.RegisterType((*Function)(nil), "opentelemetry.proto.profiles.v1development.Function") } func init() { - proto.RegisterFile("opentelemetry/proto/profiles/v1experimental/pprofextended.proto", fileDescriptor_05f9ce3fdbeb046f) -} - -var fileDescriptor_05f9ce3fdbeb046f = []byte{ - // 1445 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcf, 0x4f, 0x1b, 0xc7, - 0x17, 0x67, 0xb1, 0xf1, 0x8f, 0x67, 0x0c, 0x66, 0xc2, 0x97, 0xec, 0x37, 0x55, 0x08, 0x31, 0x6a, - 0x43, 0x89, 0x64, 0x17, 0xd2, 0x56, 0x55, 0xd4, 0xaa, 0x32, 0xc1, 0x04, 0x0b, 0xc7, 0xd0, 0xc1, - 0x90, 0xa6, 0xaa, 0xb4, 0x5a, 0x7b, 0xc7, 0x66, 0xc5, 0xee, 0xec, 0x6a, 0x77, 0x8c, 0xb0, 0xd4, - 0x63, 0x4f, 0x55, 0x0f, 0xfd, 0x3b, 0x7a, 0xeb, 0xa9, 0x7f, 0x41, 0xa5, 0x1c, 0x73, 0xa9, 0xd4, - 0x53, 0x55, 0x25, 0xff, 0x46, 0x0f, 0xd5, 0xbc, 0x99, 0xb5, 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 0x57, 0xfe, 0x1a, 0xe6, 0x30, 0x2a, 0x29, 0x41, 0x6a, 0xdc, - 0xae, 0x72, 0x29, 0x91, 0x58, 0x44, 0xba, 0x65, 0xe4, 0x52, 0x22, 0x7c, 0xe0, 0x63, 0x77, 0xa4, - 0xa8, 0x5c, 0xca, 0x6e, 0xe5, 0x03, 0x1f, 0x65, 0xd1, 0x4c, 0x23, 0x9c, 0xe5, 0x03, 0x5f, 0x4e, - 0x42, 0xf9, 0xf7, 0x14, 0x64, 0xf5, 0xab, 0x43, 0x16, 0x60, 0x56, 0xb7, 0x73, 0x9a, 0xce, 0xba, - 0x8e, 0x14, 0x27, 0x9f, 0xf9, 0x41, 0x34, 0x54, 0x75, 0xc4, 0x18, 0x69, 0x5a, 0x50, 0x18, 0x96, - 0x6f, 0xc2, 0xc5, 0x73, 0x7d, 0x57, 0x60, 0xd0, 0x91, 0x4b, 0x53, 0x42, 0x52, 0x9e, 0xe4, 0x35, - 0x5a, 0x41, 0xaf, 0x17, 0x33, 0x15, 0x3f, 0x4d, 0x41, 0x42, 0x87, 0x88, 0x90, 0x3b, 0x90, 0x93, - 0x16, 0xb7, 0x7d, 0x66, 0xce, 0x61, 0x76, 0x23, 0x5b, 0x66, 0xde, 0x19, 0xb8, 0x9e, 0x23, 0xa7, - 0x29, 0xa3, 0x32, 0x47, 0xbb, 0xe1, 0x90, 0x6f, 0xa1, 0x98, 0x6c, 0x59, 0xe7, 0x2e, 0x77, 0x50, - 0x91, 0x16, 0xb6, 0x3f, 0x9b, 0xaa, 0x96, 0x3b, 0x8a, 0xec, 0xc0, 0xe5, 0x0e, 0x2d, 0x74, 0xc6, - 0xc6, 0xb5, 0xba, 0xce, 0xbf, 0x55, 0xd7, 0x75, 0x28, 0x9e, 0xd9, 0xb1, 0x95, 0xbc, 0x6b, 0x4a, - 0x97, 0x73, 0x74, 0xfe, 0xcc, 0x8e, 0x93, 0x57, 0x6f, 0xec, 0xa4, 0xbf, 0x46, 0x69, 0xb3, 0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, 0xe6, 0x8b, 0xbe, - 0x2b, 0xce, 0x06, 0x1d, 0xf9, 0x0b, 0xb2, 0xda, 0x8f, 0xec, 0x9e, 0xcd, 0xed, 0x6a, 0x38, 0x8c, - 0x82, 0xb8, 0x1b, 0x84, 0xac, 0x6a, 0x87, 0x6e, 0x35, 0x10, 0x5e, 0xf8, 0xae, 0xff, 0x7e, 0x7e, - 0x9e, 0x7d, 0x78, 0x18, 0x32, 0xde, 0x1e, 0x85, 0x3b, 0xc2, 0x70, 0x47, 0x49, 0xb8, 0xd3, 0xad, - 0xfa, 0x84, 0x77, 0x27, 0x83, 0xd9, 0x3c, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x24, 0x49, 0x36, - 0x44, 0x61, 0x0d, 0x00, 0x00, -} - -func (m *Profile) Marshal() (dAtA []byte, err error) { + proto.RegisterFile("opentelemetry/proto/profiles/v1development/profiles.proto", fileDescriptor_ddd0cf081a2fe76f) +} + +var fileDescriptor_ddd0cf081a2fe76f = []byte{ + // 1551 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x4d, 0x6f, 0x13, 0xc7, + 0x1b, 0xcf, 0xda, 0x8e, 0x63, 0x3f, 0x7e, 0x89, 0x33, 0x84, 0x64, 0xe1, 0xff, 0x27, 0x18, 0x23, + 0x8a, 0x49, 0x45, 0x42, 0x02, 0xad, 0x4a, 0x85, 0x54, 0x25, 0x24, 0x01, 0x97, 0x90, 0x44, 0x1b, + 0x27, 0x2a, 0xed, 0x61, 0x3b, 0xf1, 0x8e, 0x9d, 0x2d, 0xbb, 0xb3, 0xab, 0x9d, 0x71, 0x84, 0xd5, + 0xaf, 0xc0, 0xa1, 0x9f, 0xa3, 0x55, 0x3f, 0x45, 0x2f, 0x1c, 0x51, 0x4f, 0x9c, 0xaa, 0x0a, 0x2e, + 0x55, 0xa5, 0x7e, 0x87, 0x6a, 0x5e, 0x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57, 0x4a, 0x66, 0x7c, 0xa5, 0xa0, 0xab, 0x7a, 0x58, 0x29, 0xb3, + 0xa6, 0xc5, 0x39, 0x8f, 0xa7, 0xd4, 0xf0, 0x51, 0xe6, 0xdc, 0x81, 0x79, 0x31, 0x47, 0x18, 0xc7, + 0x7e, 0xc8, 0xc4, 0xc8, 0x7c, 0x21, 0x27, 0x88, 0x1c, 0xf6, 0x19, 0x0b, 0xf5, 0x75, 0x47, 0xd4, + 0x7d, 0x21, 0xc6, 0xc8, 0x66, 0x09, 0x0a, 0x7d, 0x4a, 0xbb, 0xf6, 0x67, 0x0a, 0x66, 0xf4, 0x4d, + 0x26, 0x26, 0x99, 0x4f, 0xfc, 0x20, 0xea, 0xa9, 0x60, 0xc8, 0x30, 0x64, 0xac, 0x82, 0x92, 0xc9, + 0x18, 0x0c, 0x40, 0x3c, 0xd7, 0x77, 0xb9, 0x74, 0x3d, 0x81, 0xec, 0x0a, 0x11, 0xba, 0x0a, 0x05, + 0xd9, 0xc3, 0x41, 0xbb, 0xcd, 0x08, 0x97, 0x19, 0xcd, 0x58, 0x20, 0x44, 0xfb, 0x52, 0x22, 0x22, + 0x20, 0x56, 0x14, 0xfb, 0x03, 0xc5, 0x94, 0x91, 0x31, 0xac, 0xc4, 0x8a, 0xa4, 0x56, 0xc6, 0x86, + 0x6b, 0xfa, 0x9c, 0x70, 0x5d, 0x87, 0xd2, 0x29, 0x66, 0x76, 0x7c, 0x59, 0x31, 0x33, 0x5b, 0x35, + 0xea, 0x39, 0xab, 0x78, 0x8a, 0x59, 0x7c, 0x95, 0xf5, 0x41, 0xfa, 0x24, 0x66, 0xce, 0xf4, 0x41, + 0xb1, 0x0c, 0xd5, 0xa1, 0x22, 0x40, 0x9e, 0x4b, 0x89, 0x4d, 0xbb, 0xfe, 0x09, 0x89, 0xc4, 0x55, + 0x24, 0x70, 0xe5, 0x53, 0xcc, 0x76, 0x5d, 0x4a, 0xf6, 0x94, 0x14, 0x2d, 0xc3, 0x9c, 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0xe8, 0x9c, 0x15, 0x01, 0x10, 0x00, 0x00, +} + +func (m *ProfilesData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1285,111 +1409,262 @@ func (m *Profile) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Profile) MarshalTo(dAtA []byte) (int, error) { +func (m *ProfilesData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ProfilesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.LinkTable) > 0 { - for iNdEx := len(m.LinkTable) - 1; iNdEx >= 0; iNdEx-- { + if len(m.ResourceProfiles) > 0 { + for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.LinkTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 + dAtA[i] = 0xa } } - if len(m.AttributeUnits) > 0 { - for iNdEx := len(m.AttributeUnits) - 1; iNdEx >= 0; iNdEx-- { + return len(dAtA) - i, nil +} + +func (m *ResourceProfiles) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceProfiles) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DeprecatedScopeProfiles) > 0 { + for iNdEx := len(m.DeprecatedScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.AttributeUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DeprecatedScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1 + dAtA[i] = 0x3e i-- - dAtA[i] = 0x8a + dAtA[i] = 0xc2 } } - if len(m.AttributeTable) > 0 { - for iNdEx := len(m.AttributeTable) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.ScopeProfiles) > 0 { + for iNdEx := len(m.ScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.AttributeTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 + dAtA[i] = 0x12 } } - if len(m.LocationIndices) > 0 { - dAtA2 := make([]byte, len(m.LocationIndices)*10) - var j1 int - for _, num1 := range m.LocationIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintPprofextended(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x7a - } - if m.DefaultSampleType != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.DefaultSampleType)) - i-- - dAtA[i] = 0x70 + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) } - if len(m.Comment) > 0 { - dAtA4 := make([]byte, len(m.Comment)*10) - var j3 int - for _, num1 := range m.Comment { - num := uint64(num1) - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ScopeProfiles) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ScopeProfiles) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ScopeProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.Profiles) > 0 { + for iNdEx := len(m.Profiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Profiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Profile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Profile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AttributeIndices) > 0 { + dAtA4 := make([]byte, len(m.AttributeIndices)*10) + var j3 int + for _, num1 := range m.AttributeIndices { + num := uint64(num1) + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ } dAtA4[j3] = uint8(num) j3++ } i -= j3 copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintPprofextended(dAtA, i, uint64(j3)) + i = encodeVarintProfiles(dAtA, i, uint64(j3)) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if len(m.OriginalPayload) > 0 { + i -= len(m.OriginalPayload) + copy(dAtA[i:], m.OriginalPayload) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayload))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if len(m.OriginalPayloadFormat) > 0 { + i -= len(m.OriginalPayloadFormat) + copy(dAtA[i:], m.OriginalPayloadFormat) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayloadFormat))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + if len(m.ProfileId) > 0 { + i -= len(m.ProfileId) + copy(dAtA[i:], m.ProfileId) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.ProfileId))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if m.DefaultSampleTypeStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.DefaultSampleTypeStrindex)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if len(m.CommentStrindices) > 0 { + dAtA6 := make([]byte, len(m.CommentStrindices)*10) + var j5 int + for _, num1 := range m.CommentStrindices { + num := uint64(num1) + for num >= 1<<7 { + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + dAtA6[j5] = uint8(num) + j5++ + } + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) + i = encodeVarintProfiles(dAtA, i, uint64(j5)) + i-- + dAtA[i] = 0x7a } if m.Period != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Period)) + i = encodeVarintProfiles(dAtA, i, uint64(m.Period)) i-- - dAtA[i] = 0x60 + dAtA[i] = 0x70 } if m.PeriodType != nil { { @@ -1398,77 +1673,128 @@ func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a + dAtA[i] = 0x6a } if m.DurationNanos != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.DurationNanos)) + i = encodeVarintProfiles(dAtA, i, uint64(m.DurationNanos)) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x60 } if m.TimeNanos != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.TimeNanos)) - i-- - dAtA[i] = 0x48 - } - if m.KeepFrames != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.KeepFrames)) + i = encodeVarintProfiles(dAtA, i, uint64(m.TimeNanos)) i-- - dAtA[i] = 0x40 - } - if m.DropFrames != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.DropFrames)) - i-- - dAtA[i] = 0x38 + dAtA[i] = 0x58 } if len(m.StringTable) > 0 { for iNdEx := len(m.StringTable) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.StringTable[iNdEx]) copy(dAtA[i:], m.StringTable[iNdEx]) - i = encodeVarintPprofextended(dAtA, i, uint64(len(m.StringTable[iNdEx]))) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.StringTable[iNdEx]))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x52 + } + } + if len(m.LinkTable) > 0 { + for iNdEx := len(m.LinkTable) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LinkTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.AttributeUnits) > 0 { + for iNdEx := len(m.AttributeUnits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.AttributeTable) > 0 { + for iNdEx := len(m.AttributeTable) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } } - if len(m.Function) > 0 { - for iNdEx := len(m.Function) - 1; iNdEx >= 0; iNdEx-- { + if len(m.FunctionTable) > 0 { + for iNdEx := len(m.FunctionTable) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Function[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.FunctionTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 + } + } + if len(m.LocationIndices) > 0 { + dAtA9 := make([]byte, len(m.LocationIndices)*10) + var j8 int + for _, num1 := range m.LocationIndices { + num := uint64(num1) + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintProfiles(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0x2a } - if len(m.Location) > 0 { - for iNdEx := len(m.Location) - 1; iNdEx >= 0; iNdEx-- { + if len(m.LocationTable) > 0 { + for iNdEx := len(m.LocationTable) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Location[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LocationTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } - if len(m.Mapping) > 0 { - for iNdEx := len(m.Mapping) - 1; iNdEx >= 0; iNdEx-- { + if len(m.MappingTable) > 0 { + for iNdEx := len(m.MappingTable) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Mapping[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.MappingTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -1482,7 +1808,7 @@ func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -1496,7 +1822,7 @@ func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -1525,13 +1851,13 @@ func (m *AttributeUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Unit != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Unit)) + if m.UnitStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.UnitStrindex)) i-- dAtA[i] = 0x10 } - if m.AttributeKey != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.AttributeKey)) + if m.AttributeKeyStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.AttributeKeyStrindex)) i-- dAtA[i] = 0x8 } @@ -1561,14 +1887,14 @@ func (m *Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.SpanId) > 0 { i -= len(m.SpanId) copy(dAtA[i:], m.SpanId) - i = encodeVarintPprofextended(dAtA, i, uint64(len(m.SpanId))) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SpanId))) i-- dAtA[i] = 0x12 } if len(m.TraceId) > 0 { i -= len(m.TraceId) copy(dAtA[i:], m.TraceId) - i = encodeVarintPprofextended(dAtA, i, uint64(len(m.TraceId))) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.TraceId))) i-- dAtA[i] = 0xa } @@ -1596,17 +1922,17 @@ func (m *ValueType) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.AggregationTemporality != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.AggregationTemporality)) + i = encodeVarintProfiles(dAtA, i, uint64(m.AggregationTemporality)) i-- dAtA[i] = 0x18 } - if m.Unit != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Unit)) + if m.UnitStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.UnitStrindex)) i-- dAtA[i] = 0x10 } - if m.Type != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Type)) + if m.TypeStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.TypeStrindex)) i-- dAtA[i] = 0x8 } @@ -1634,80 +1960,9 @@ func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.TimestampsUnixNano) > 0 { - dAtA7 := make([]byte, len(m.TimestampsUnixNano)*10) - var j6 int - for _, num := range m.TimestampsUnixNano { - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintPprofextended(dAtA, i, uint64(j6)) - i-- - dAtA[i] = 0x6a - } - if m.Link != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Link)) - i-- - dAtA[i] = 0x60 - } - if len(m.Attributes) > 0 { - dAtA9 := make([]byte, len(m.Attributes)*10) - var j8 int - for _, num := range m.Attributes { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintPprofextended(dAtA, i, uint64(j8)) - i-- - dAtA[i] = 0x52 - } - if m.StacktraceIdIndex != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.StacktraceIdIndex)) - i-- - dAtA[i] = 0x48 - } - if m.LocationsLength != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.LocationsLength)) - i-- - dAtA[i] = 0x40 - } - if m.LocationsStartIndex != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.LocationsStartIndex)) - i-- - dAtA[i] = 0x38 - } - if len(m.Label) > 0 { - for iNdEx := len(m.Label) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Label[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Value) > 0 { - dAtA11 := make([]byte, len(m.Value)*10) + dAtA11 := make([]byte, len(m.TimestampsUnixNano)*10) var j10 int - for _, num1 := range m.Value { - num := uint64(num1) + for _, num := range m.TimestampsUnixNano { for num >= 1<<7 { dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -1718,14 +1973,24 @@ func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i -= j10 copy(dAtA[i:], dAtA11[:j10]) - i = encodeVarintPprofextended(dAtA, i, uint64(j10)) + i = encodeVarintProfiles(dAtA, i, uint64(j10)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 + } + if m.LinkIndex_ != nil { + { + size := m.LinkIndex_.Size() + i -= size + if _, err := m.LinkIndex_.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } - if len(m.LocationIndex) > 0 { - dAtA13 := make([]byte, len(m.LocationIndex)*10) + if len(m.AttributeIndices) > 0 { + dAtA13 := make([]byte, len(m.AttributeIndices)*10) var j12 int - for _, num := range m.LocationIndex { + for _, num1 := range m.AttributeIndices { + num := uint64(num1) for num >= 1<<7 { dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -1736,14 +2001,55 @@ func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i -= j12 copy(dAtA[i:], dAtA13[:j12]) - i = encodeVarintPprofextended(dAtA, i, uint64(j12)) + i = encodeVarintProfiles(dAtA, i, uint64(j12)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x22 + } + if len(m.Value) > 0 { + dAtA15 := make([]byte, len(m.Value)*10) + var j14 int + for _, num1 := range m.Value { + num := uint64(num1) + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + i -= j14 + copy(dAtA[i:], dAtA15[:j14]) + i = encodeVarintProfiles(dAtA, i, uint64(j14)) + i-- + dAtA[i] = 0x1a + } + if m.LocationsLength != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.LocationsLength)) + i-- + dAtA[i] = 0x10 + } + if m.LocationsStartIndex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.LocationsStartIndex)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Label) Marshal() (dAtA []byte, err error) { +func (m *Sample_LinkIndex) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sample_LinkIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintProfiles(dAtA, i, uint64(m.LinkIndex)) + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil +} +func (m *Mapping) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1753,91 +2059,25 @@ func (m *Label) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Label) MarshalTo(dAtA []byte) (int, error) { +func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Label) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.NumUnit != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.NumUnit)) + if m.HasInlineFrames { i-- - dAtA[i] = 0x20 - } - if m.Num != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Num)) + if m.HasInlineFrames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- - dAtA[i] = 0x18 - } - if m.Str != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Str)) - i-- - dAtA[i] = 0x10 - } - if m.Key != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Mapping) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - dAtA15 := make([]byte, len(m.Attributes)*10) - var j14 int - for _, num := range m.Attributes { - for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j14++ - } - dAtA15[j14] = uint8(num) - j14++ - } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintPprofextended(dAtA, i, uint64(j14)) - i-- - dAtA[i] = 0x62 - } - if m.BuildIdKind != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.BuildIdKind)) - i-- - dAtA[i] = 0x58 - } - if m.HasInlineFrames { - i-- - if m.HasInlineFrames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 + dAtA[i] = 0x48 } if m.HasLineNumbers { i-- @@ -1847,7 +2087,7 @@ func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x48 + dAtA[i] = 0x40 } if m.HasFilenames { i-- @@ -1857,7 +2097,7 @@ func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 } if m.HasFunctions { i-- @@ -1867,35 +2107,44 @@ func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x38 - } - if m.BuildId != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.BuildId)) - i-- dAtA[i] = 0x30 } - if m.Filename != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Filename)) + if len(m.AttributeIndices) > 0 { + dAtA17 := make([]byte, len(m.AttributeIndices)*10) + var j16 int + for _, num1 := range m.AttributeIndices { + num := uint64(num1) + for num >= 1<<7 { + dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j16++ + } + dAtA17[j16] = uint8(num) + j16++ + } + i -= j16 + copy(dAtA[i:], dAtA17[:j16]) + i = encodeVarintProfiles(dAtA, i, uint64(j16)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if m.FileOffset != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.FileOffset)) + if m.FilenameStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.FilenameStrindex)) i-- dAtA[i] = 0x20 } - if m.MemoryLimit != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.MemoryLimit)) + if m.FileOffset != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.FileOffset)) i-- dAtA[i] = 0x18 } - if m.MemoryStart != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.MemoryStart)) + if m.MemoryLimit != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.MemoryLimit)) i-- dAtA[i] = 0x10 } - if m.Id != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + if m.MemoryStart != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.MemoryStart)) i-- dAtA[i] = 0x8 } @@ -1922,28 +2171,24 @@ func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Attributes) > 0 { - dAtA17 := make([]byte, len(m.Attributes)*10) - var j16 int - for _, num := range m.Attributes { + if len(m.AttributeIndices) > 0 { + dAtA19 := make([]byte, len(m.AttributeIndices)*10) + var j18 int + for _, num1 := range m.AttributeIndices { + num := uint64(num1) for num >= 1<<7 { - dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) + dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j16++ + j18++ } - dAtA17[j16] = uint8(num) - j16++ + dAtA19[j18] = uint8(num) + j18++ } - i -= j16 - copy(dAtA[i:], dAtA17[:j16]) - i = encodeVarintPprofextended(dAtA, i, uint64(j16)) + i -= j18 + copy(dAtA[i:], dAtA19[:j18]) + i = encodeVarintProfiles(dAtA, i, uint64(j18)) i-- - dAtA[i] = 0x3a - } - if m.TypeIndex != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.TypeIndex)) - i-- - dAtA[i] = 0x30 + dAtA[i] = 0x2a } if m.IsFolded { i-- @@ -1953,7 +2198,7 @@ func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if len(m.Line) > 0 { for iNdEx := len(m.Line) - 1; iNdEx >= 0; iNdEx-- { @@ -1963,30 +2208,41 @@ func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPprofextended(dAtA, i, uint64(size)) + i = encodeVarintProfiles(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } if m.Address != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Address)) - i-- - dAtA[i] = 0x18 - } - if m.MappingIndex != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.MappingIndex)) + i = encodeVarintProfiles(dAtA, i, uint64(m.Address)) i-- dAtA[i] = 0x10 } - if m.Id != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + if m.MappingIndex_ != nil { + { + size := m.MappingIndex_.Size() + i -= size + if _, err := m.MappingIndex_.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } return len(dAtA) - i, nil } +func (m *Location_MappingIndex) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location_MappingIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintProfiles(dAtA, i, uint64(m.MappingIndex)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} func (m *Line) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2008,17 +2264,17 @@ func (m *Line) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Column != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Column)) + i = encodeVarintProfiles(dAtA, i, uint64(m.Column)) i-- dAtA[i] = 0x18 } if m.Line != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Line)) + i = encodeVarintProfiles(dAtA, i, uint64(m.Line)) i-- dAtA[i] = 0x10 } if m.FunctionIndex != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.FunctionIndex)) + i = encodeVarintProfiles(dAtA, i, uint64(m.FunctionIndex)) i-- dAtA[i] = 0x8 } @@ -2046,35 +2302,30 @@ func (m *Function) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.StartLine != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.StartLine)) - i-- - dAtA[i] = 0x28 - } - if m.Filename != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Filename)) + i = encodeVarintProfiles(dAtA, i, uint64(m.StartLine)) i-- dAtA[i] = 0x20 } - if m.SystemName != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.SystemName)) + if m.FilenameStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.FilenameStrindex)) i-- dAtA[i] = 0x18 } - if m.Name != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Name)) + if m.SystemNameStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.SystemNameStrindex)) i-- dAtA[i] = 0x10 } - if m.Id != 0 { - i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + if m.NameStrindex != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.NameStrindex)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintPprofextended(dAtA []byte, offset int, v uint64) int { - offset -= sovPprofextended(v) +func encodeVarintProfiles(dAtA []byte, offset int, v uint64) int { + offset -= sovProfiles(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -2084,6 +2335,69 @@ func encodeVarintPprofextended(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *ProfilesData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for _, e := range m.ResourceProfiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + return n +} + +func (m *ResourceProfiles) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resource.Size() + n += 1 + l + sovProfiles(uint64(l)) + if len(m.ScopeProfiles) > 0 { + for _, e := range m.ScopeProfiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + if len(m.DeprecatedScopeProfiles) > 0 { + for _, e := range m.DeprecatedScopeProfiles { + l = e.Size() + n += 2 + l + sovProfiles(uint64(l)) + } + } + return n +} + +func (m *ScopeProfiles) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Scope.Size() + n += 1 + l + sovProfiles(uint64(l)) + if len(m.Profiles) > 0 { + for _, e := range m.Profiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + return n +} + func (m *Profile) Size() (n int) { if m == nil { return 0 @@ -2093,92 +2407,108 @@ func (m *Profile) Size() (n int) { if len(m.SampleType) > 0 { for _, e := range m.SampleType { l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } } if len(m.Sample) > 0 { for _, e := range m.Sample { l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) + } + } + if len(m.MappingTable) > 0 { + for _, e := range m.MappingTable { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + if len(m.LocationTable) > 0 { + for _, e := range m.LocationTable { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + if len(m.LocationIndices) > 0 { + l = 0 + for _, e := range m.LocationIndices { + l += sovProfiles(uint64(e)) + } + n += 1 + sovProfiles(uint64(l)) + l + } + if len(m.FunctionTable) > 0 { + for _, e := range m.FunctionTable { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) } } - if len(m.Mapping) > 0 { - for _, e := range m.Mapping { + if len(m.AttributeTable) > 0 { + for _, e := range m.AttributeTable { l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } } - if len(m.Location) > 0 { - for _, e := range m.Location { + if len(m.AttributeUnits) > 0 { + for _, e := range m.AttributeUnits { l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } } - if len(m.Function) > 0 { - for _, e := range m.Function { + if len(m.LinkTable) > 0 { + for _, e := range m.LinkTable { l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } } if len(m.StringTable) > 0 { for _, s := range m.StringTable { l = len(s) - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } } - if m.DropFrames != 0 { - n += 1 + sovPprofextended(uint64(m.DropFrames)) - } - if m.KeepFrames != 0 { - n += 1 + sovPprofextended(uint64(m.KeepFrames)) - } if m.TimeNanos != 0 { - n += 1 + sovPprofextended(uint64(m.TimeNanos)) + n += 1 + sovProfiles(uint64(m.TimeNanos)) } if m.DurationNanos != 0 { - n += 1 + sovPprofextended(uint64(m.DurationNanos)) + n += 1 + sovProfiles(uint64(m.DurationNanos)) } if m.PeriodType != nil { l = m.PeriodType.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } if m.Period != 0 { - n += 1 + sovPprofextended(uint64(m.Period)) + n += 1 + sovProfiles(uint64(m.Period)) } - if len(m.Comment) > 0 { + if len(m.CommentStrindices) > 0 { l = 0 - for _, e := range m.Comment { - l += sovPprofextended(uint64(e)) + for _, e := range m.CommentStrindices { + l += sovProfiles(uint64(e)) } - n += 1 + sovPprofextended(uint64(l)) + l + n += 1 + sovProfiles(uint64(l)) + l } - if m.DefaultSampleType != 0 { - n += 1 + sovPprofextended(uint64(m.DefaultSampleType)) + if m.DefaultSampleTypeStrindex != 0 { + n += 2 + sovProfiles(uint64(m.DefaultSampleTypeStrindex)) } - if len(m.LocationIndices) > 0 { - l = 0 - for _, e := range m.LocationIndices { - l += sovPprofextended(uint64(e)) - } - n += 1 + sovPprofextended(uint64(l)) + l + l = len(m.ProfileId) + if l > 0 { + n += 2 + l + sovProfiles(uint64(l)) } - if len(m.AttributeTable) > 0 { - for _, e := range m.AttributeTable { - l = e.Size() - n += 2 + l + sovPprofextended(uint64(l)) - } + if m.DroppedAttributesCount != 0 { + n += 2 + sovProfiles(uint64(m.DroppedAttributesCount)) } - if len(m.AttributeUnits) > 0 { - for _, e := range m.AttributeUnits { - l = e.Size() - n += 2 + l + sovPprofextended(uint64(l)) - } + l = len(m.OriginalPayloadFormat) + if l > 0 { + n += 2 + l + sovProfiles(uint64(l)) } - if len(m.LinkTable) > 0 { - for _, e := range m.LinkTable { - l = e.Size() - n += 2 + l + sovPprofextended(uint64(l)) + l = len(m.OriginalPayload) + if l > 0 { + n += 2 + l + sovProfiles(uint64(l)) + } + if len(m.AttributeIndices) > 0 { + l = 0 + for _, e := range m.AttributeIndices { + l += sovProfiles(uint64(e)) } + n += 2 + sovProfiles(uint64(l)) + l } return n } @@ -2189,11 +2519,11 @@ func (m *AttributeUnit) Size() (n int) { } var l int _ = l - if m.AttributeKey != 0 { - n += 1 + sovPprofextended(uint64(m.AttributeKey)) + if m.AttributeKeyStrindex != 0 { + n += 1 + sovProfiles(uint64(m.AttributeKeyStrindex)) } - if m.Unit != 0 { - n += 1 + sovPprofextended(uint64(m.Unit)) + if m.UnitStrindex != 0 { + n += 1 + sovProfiles(uint64(m.UnitStrindex)) } return n } @@ -2206,11 +2536,11 @@ func (m *Link) Size() (n int) { _ = l l = len(m.TraceId) if l > 0 { - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } l = len(m.SpanId) if l > 0 { - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } return n } @@ -2221,14 +2551,14 @@ func (m *ValueType) Size() (n int) { } var l int _ = l - if m.Type != 0 { - n += 1 + sovPprofextended(uint64(m.Type)) + if m.TypeStrindex != 0 { + n += 1 + sovProfiles(uint64(m.TypeStrindex)) } - if m.Unit != 0 { - n += 1 + sovPprofextended(uint64(m.Unit)) + if m.UnitStrindex != 0 { + n += 1 + sovProfiles(uint64(m.UnitStrindex)) } if m.AggregationTemporality != 0 { - n += 1 + sovPprofextended(uint64(m.AggregationTemporality)) + n += 1 + sovProfiles(uint64(m.AggregationTemporality)) } return n } @@ -2239,99 +2569,72 @@ func (m *Sample) Size() (n int) { } var l int _ = l - if len(m.LocationIndex) > 0 { - l = 0 - for _, e := range m.LocationIndex { - l += sovPprofextended(uint64(e)) - } - n += 1 + sovPprofextended(uint64(l)) + l + if m.LocationsStartIndex != 0 { + n += 1 + sovProfiles(uint64(m.LocationsStartIndex)) + } + if m.LocationsLength != 0 { + n += 1 + sovProfiles(uint64(m.LocationsLength)) } if len(m.Value) > 0 { l = 0 for _, e := range m.Value { - l += sovPprofextended(uint64(e)) + l += sovProfiles(uint64(e)) } - n += 1 + sovPprofextended(uint64(l)) + l - } - if len(m.Label) > 0 { - for _, e := range m.Label { - l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) - } - } - if m.LocationsStartIndex != 0 { - n += 1 + sovPprofextended(uint64(m.LocationsStartIndex)) - } - if m.LocationsLength != 0 { - n += 1 + sovPprofextended(uint64(m.LocationsLength)) - } - if m.StacktraceIdIndex != 0 { - n += 1 + sovPprofextended(uint64(m.StacktraceIdIndex)) + n += 1 + sovProfiles(uint64(l)) + l } - if len(m.Attributes) > 0 { + if len(m.AttributeIndices) > 0 { l = 0 - for _, e := range m.Attributes { - l += sovPprofextended(uint64(e)) + for _, e := range m.AttributeIndices { + l += sovProfiles(uint64(e)) } - n += 1 + sovPprofextended(uint64(l)) + l + n += 1 + sovProfiles(uint64(l)) + l } - if m.Link != 0 { - n += 1 + sovPprofextended(uint64(m.Link)) + if m.LinkIndex_ != nil { + n += m.LinkIndex_.Size() } if len(m.TimestampsUnixNano) > 0 { l = 0 for _, e := range m.TimestampsUnixNano { - l += sovPprofextended(uint64(e)) + l += sovProfiles(uint64(e)) } - n += 1 + sovPprofextended(uint64(l)) + l + n += 1 + sovProfiles(uint64(l)) + l } return n } -func (m *Label) Size() (n int) { +func (m *Sample_LinkIndex) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Key != 0 { - n += 1 + sovPprofextended(uint64(m.Key)) - } - if m.Str != 0 { - n += 1 + sovPprofextended(uint64(m.Str)) - } - if m.Num != 0 { - n += 1 + sovPprofextended(uint64(m.Num)) - } - if m.NumUnit != 0 { - n += 1 + sovPprofextended(uint64(m.NumUnit)) - } + n += 1 + sovProfiles(uint64(m.LinkIndex)) return n } - func (m *Mapping) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != 0 { - n += 1 + sovPprofextended(uint64(m.Id)) - } if m.MemoryStart != 0 { - n += 1 + sovPprofextended(uint64(m.MemoryStart)) + n += 1 + sovProfiles(uint64(m.MemoryStart)) } if m.MemoryLimit != 0 { - n += 1 + sovPprofextended(uint64(m.MemoryLimit)) + n += 1 + sovProfiles(uint64(m.MemoryLimit)) } if m.FileOffset != 0 { - n += 1 + sovPprofextended(uint64(m.FileOffset)) + n += 1 + sovProfiles(uint64(m.FileOffset)) } - if m.Filename != 0 { - n += 1 + sovPprofextended(uint64(m.Filename)) + if m.FilenameStrindex != 0 { + n += 1 + sovProfiles(uint64(m.FilenameStrindex)) } - if m.BuildId != 0 { - n += 1 + sovPprofextended(uint64(m.BuildId)) + if len(m.AttributeIndices) > 0 { + l = 0 + for _, e := range m.AttributeIndices { + l += sovProfiles(uint64(e)) + } + n += 1 + sovProfiles(uint64(l)) + l } if m.HasFunctions { n += 2 @@ -2345,16 +2648,6 @@ func (m *Mapping) Size() (n int) { if m.HasInlineFrames { n += 2 } - if m.BuildIdKind != 0 { - n += 1 + sovPprofextended(uint64(m.BuildIdKind)) - } - if len(m.Attributes) > 0 { - l = 0 - for _, e := range m.Attributes { - l += sovPprofextended(uint64(e)) - } - n += 1 + sovPprofextended(uint64(l)) + l - } return n } @@ -2364,37 +2657,40 @@ func (m *Location) Size() (n int) { } var l int _ = l - if m.Id != 0 { - n += 1 + sovPprofextended(uint64(m.Id)) - } - if m.MappingIndex != 0 { - n += 1 + sovPprofextended(uint64(m.MappingIndex)) + if m.MappingIndex_ != nil { + n += m.MappingIndex_.Size() } if m.Address != 0 { - n += 1 + sovPprofextended(uint64(m.Address)) + n += 1 + sovProfiles(uint64(m.Address)) } if len(m.Line) > 0 { for _, e := range m.Line { l = e.Size() - n += 1 + l + sovPprofextended(uint64(l)) + n += 1 + l + sovProfiles(uint64(l)) } } if m.IsFolded { n += 2 } - if m.TypeIndex != 0 { - n += 1 + sovPprofextended(uint64(m.TypeIndex)) - } - if len(m.Attributes) > 0 { + if len(m.AttributeIndices) > 0 { l = 0 - for _, e := range m.Attributes { - l += sovPprofextended(uint64(e)) + for _, e := range m.AttributeIndices { + l += sovProfiles(uint64(e)) } - n += 1 + sovPprofextended(uint64(l)) + l + n += 1 + sovProfiles(uint64(l)) + l } return n } +func (m *Location_MappingIndex) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovProfiles(uint64(m.MappingIndex)) + return n +} func (m *Line) Size() (n int) { if m == nil { return 0 @@ -2402,13 +2698,13 @@ func (m *Line) Size() (n int) { var l int _ = l if m.FunctionIndex != 0 { - n += 1 + sovPprofextended(uint64(m.FunctionIndex)) + n += 1 + sovProfiles(uint64(m.FunctionIndex)) } if m.Line != 0 { - n += 1 + sovPprofextended(uint64(m.Line)) + n += 1 + sovProfiles(uint64(m.Line)) } if m.Column != 0 { - n += 1 + sovPprofextended(uint64(m.Column)) + n += 1 + sovProfiles(uint64(m.Column)) } return n } @@ -2419,31 +2715,28 @@ func (m *Function) Size() (n int) { } var l int _ = l - if m.Id != 0 { - n += 1 + sovPprofextended(uint64(m.Id)) - } - if m.Name != 0 { - n += 1 + sovPprofextended(uint64(m.Name)) + if m.NameStrindex != 0 { + n += 1 + sovProfiles(uint64(m.NameStrindex)) } - if m.SystemName != 0 { - n += 1 + sovPprofextended(uint64(m.SystemName)) + if m.SystemNameStrindex != 0 { + n += 1 + sovProfiles(uint64(m.SystemNameStrindex)) } - if m.Filename != 0 { - n += 1 + sovPprofextended(uint64(m.Filename)) + if m.FilenameStrindex != 0 { + n += 1 + sovProfiles(uint64(m.FilenameStrindex)) } if m.StartLine != 0 { - n += 1 + sovPprofextended(uint64(m.StartLine)) + n += 1 + sovProfiles(uint64(m.StartLine)) } return n } -func sovPprofextended(x uint64) (n int) { +func sovProfiles(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozPprofextended(x uint64) (n int) { - return sovPprofextended(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozProfiles(x uint64) (n int) { + return sovProfiles(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Profile) Unmarshal(dAtA []byte) error { +func (m *ProfilesData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2451,7 +2744,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2466,20 +2759,20 @@ func (m *Profile) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Profile: wiretype end group for non-group") + return fmt.Errorf("proto: ProfilesData: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ProfilesData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2492,62 +2785,177 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.SampleType = append(m.SampleType, &ValueType{}) - if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ResourceProfiles = append(m.ResourceProfiles, &ResourceProfiles{}) + if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceProfiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceProfiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceProfiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.Sample = append(m.Sample, &Sample{}) - if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScopeProfiles = append(m.ScopeProfiles, &ScopeProfiles{}) + if err := m.ScopeProfiles[len(m.ScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mapping", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 1000: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeProfiles", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2560,28 +2968,78 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.Mapping = append(m.Mapping, &Mapping{}) - if err := m.Mapping[len(m.Mapping)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.DeprecatedScopeProfiles = append(m.DeprecatedScopeProfiles, &ScopeProfiles{}) + if err := m.DeprecatedScopeProfiles[len(m.DeprecatedScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScopeProfiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScopeProfiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScopeProfiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2594,28 +3052,27 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.Location = append(m.Location, &Location{}) - if err := m.Location[len(m.Location)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Function", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2628,28 +3085,28 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.Function = append(m.Function, &Function{}) - if err := m.Function[len(m.Function)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Profiles = append(m.Profiles, &Profile{}) + if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2663,63 +3120,455 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Profile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SampleType = append(m.SampleType, &ValueType{}) + if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sample = append(m.Sample, &Sample{}) + if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MappingTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MappingTable = append(m.MappingTable, &Mapping{}) + if err := m.MappingTable[len(m.MappingTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LocationTable = append(m.LocationTable, &Location{}) + if err := m.LocationTable[len(m.LocationTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndices = append(m.LocationIndices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.LocationIndices) == 0 { + m.LocationIndices = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndices = append(m.LocationIndices, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FunctionTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FunctionTable = append(m.FunctionTable, &Function{}) + if err := m.FunctionTable[len(m.FunctionTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DropFrames", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeTable = append(m.AttributeTable, v11.KeyValue{}) + if err := m.AttributeTable[len(m.AttributeTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeUnits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeUnits = append(m.AttributeUnits, &AttributeUnit{}) + if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.DropFrames = 0 + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.DropFrames |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepFrames", wireType) + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LinkTable = append(m.LinkTable, &Link{}) + if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) } - m.KeepFrames = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.KeepFrames |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 9: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TimeNanos", wireType) } m.TimeNanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2731,14 +3580,14 @@ func (m *Profile) Unmarshal(dAtA []byte) error { break } } - case 10: + case 12: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) } m.DurationNanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2750,14 +3599,14 @@ func (m *Profile) Unmarshal(dAtA []byte) error { break } } - case 11: + case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2770,11 +3619,11 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -2786,14 +3635,14 @@ func (m *Profile) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 12: + case 14: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } m.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2805,29 +3654,29 @@ func (m *Profile) Unmarshal(dAtA []byte) error { break } } - case 13: + case 15: if wireType == 0 { - var v int64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Comment = append(m.Comment, v) + m.CommentStrindices = append(m.CommentStrindices, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2840,11 +3689,11 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -2857,235 +3706,252 @@ func (m *Profile) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.Comment) == 0 { - m.Comment = make([]int64, 0, elementCount) + if elementCount != 0 && len(m.CommentStrindices) == 0 { + m.CommentStrindices = make([]int32, 0, elementCount) } for iNdEx < postIndex { - var v int64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Comment = append(m.Comment, v) + m.CommentStrindices = append(m.CommentStrindices, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CommentStrindices", wireType) } - case 14: + case 16: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleTypeStrindex", wireType) } - m.DefaultSampleType = 0 + m.DefaultSampleTypeStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.DefaultSampleType |= int64(b&0x7F) << shift + m.DefaultSampleTypeStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 15: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndices = append(m.LocationIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPprofextended - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthPprofextended - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.LocationIndices) == 0 { - m.LocationIndices = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndices = append(m.LocationIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) - } - case 16: + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthPprofextended + if byteLen < 0 { + return ErrInvalidLengthProfiles } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.AttributeTable = append(m.AttributeTable, v1.KeyValue{}) - if err := m.AttributeTable[len(m.AttributeTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ProfileId = append(m.ProfileId[:0], dAtA[iNdEx:postIndex]...) + if m.ProfileId == nil { + m.ProfileId = []byte{} } iNdEx = postIndex - case 17: + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeUnits", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthPprofextended + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.AttributeUnits = append(m.AttributeUnits, &AttributeUnit{}) - if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.OriginalPayloadFormat = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 18: + case 21: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthPprofextended + if byteLen < 0 { + return ErrInvalidLengthProfiles } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF } - m.LinkTable = append(m.LinkTable, &Link{}) - if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.OriginalPayload = append(m.OriginalPayload[:0], dAtA[iNdEx:postIndex]...) + if m.OriginalPayload == nil { + m.OriginalPayload = []byte{} } iNdEx = postIndex + case 22: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AttributeIndices = append(m.AttributeIndices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.AttributeIndices) == 0 { + m.AttributeIndices = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AttributeIndices = append(m.AttributeIndices, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) + } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3107,7 +3973,7 @@ func (m *AttributeUnit) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3130,50 +3996,50 @@ func (m *AttributeUnit) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttributeKeyStrindex", wireType) } - m.AttributeKey = 0 + m.AttributeKeyStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.AttributeKey |= int64(b&0x7F) << shift + m.AttributeKeyStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) } - m.Unit = 0 + m.UnitStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Unit |= int64(b&0x7F) << shift + m.UnitStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3195,7 +4061,7 @@ func (m *Link) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3223,7 +4089,7 @@ func (m *Link) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3236,11 +4102,11 @@ func (m *Link) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -3257,7 +4123,7 @@ func (m *Link) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3270,11 +4136,11 @@ func (m *Link) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -3286,12 +4152,12 @@ func (m *Link) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3313,7 +4179,7 @@ func (m *ValueType) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3336,38 +4202,38 @@ func (m *ValueType) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TypeStrindex", wireType) } - m.Type = 0 + m.TypeStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Type |= int64(b&0x7F) << shift + m.TypeStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) } - m.Unit = 0 + m.UnitStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Unit |= int64(b&0x7F) << shift + m.UnitStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -3379,7 +4245,7 @@ func (m *ValueType) Unmarshal(dAtA []byte) error { m.AggregationTemporality = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3393,12 +4259,12 @@ func (m *ValueType) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3420,7 +4286,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3442,87 +4308,49 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndex = append(m.LocationIndex, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPprofextended - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthPprofextended + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationsStartIndex", wireType) + } + m.LocationsStartIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + b := dAtA[iNdEx] + iNdEx++ + m.LocationsStartIndex |= int32(b&0x7F) << shift + if b < 0x80 { + break } - elementCount = count - if elementCount != 0 && len(m.LocationIndex) == 0 { - m.LocationIndex = make([]uint64, 0, elementCount) + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationsLength", wireType) + } + m.LocationsLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndex = append(m.LocationIndex, v) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocationsLength |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field LocationIndex", wireType) } - case 2: + case 3: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3539,7 +4367,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3552,11 +4380,11 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -3576,7 +4404,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3593,120 +4421,29 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPprofextended - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPprofextended - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Label = append(m.Label, &Label{}) - if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationsStartIndex", wireType) - } - m.LocationsStartIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocationsStartIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationsLength", wireType) - } - m.LocationsLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocationsLength |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StacktraceIdIndex", wireType) - } - m.StacktraceIdIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StacktraceIdIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: + case 4: if wireType == 0 { - var v uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Attributes = append(m.Attributes, v) + m.AttributeIndices = append(m.AttributeIndices, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3719,11 +4456,11 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -3736,55 +4473,56 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.Attributes) == 0 { - m.Attributes = make([]uint64, 0, elementCount) + if elementCount != 0 && len(m.AttributeIndices) == 0 { + m.AttributeIndices = make([]int32, 0, elementCount) } for iNdEx < postIndex { - var v uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Attributes = append(m.Attributes, v) + m.AttributeIndices = append(m.AttributeIndices, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) } - case 12: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LinkIndex", wireType) } - m.Link = 0 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Link |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 13: + m.LinkIndex_ = &Sample_LinkIndex{v} + case 6: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3801,7 +4539,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3814,11 +4552,11 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -3834,161 +4572,35 @@ func (m *Sample) Unmarshal(dAtA []byte) error { if elementCount != 0 && len(m.TimestampsUnixNano) == 0 { m.TimestampsUnixNano = make([]uint64, 0, elementCount) } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Label) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Label: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) - } - m.Str = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Str |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Num", wireType) - } - m.Num = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Num |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumUnit", wireType) - } - m.NumUnit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumUnit |= int64(b&0x7F) << shift - if b < 0x80 { - break + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4010,7 +4622,7 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4032,32 +4644,13 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) } m.MemoryStart = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4069,14 +4662,14 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { break } } - case 3: + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) } m.MemoryLimit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4088,14 +4681,14 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { break } } - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) } m.FileOffset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4107,52 +4700,109 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { break } } - case 5: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) } - m.Filename = 0 + m.FilenameStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Filename |= int64(b&0x7F) << shift + m.FilenameStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildId", wireType) - } - m.BuildId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended + case 5: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { + m.AttributeIndices = append(m.AttributeIndices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - m.BuildId |= int64(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.AttributeIndices) == 0 { + m.AttributeIndices = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AttributeIndices = append(m.AttributeIndices, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) } - case 7: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HasFunctions", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4165,14 +4815,14 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { } } m.HasFunctions = bool(v != 0) - case 8: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HasFilenames", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4185,14 +4835,14 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { } } m.HasFilenames = bool(v != 0) - case 9: + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HasLineNumbers", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4205,14 +4855,14 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { } } m.HasLineNumbers = bool(v != 0) - case 10: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HasInlineFrames", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4225,109 +4875,14 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { } } m.HasInlineFrames = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildIdKind", wireType) - } - m.BuildIdKind = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BuildIdKind |= BuildIdKind(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Attributes = append(m.Attributes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthPprofextended - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthPprofextended - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Attributes) == 0 { - m.Attributes = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Attributes = append(m.Attributes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4349,7 +4904,7 @@ func (m *Location) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4371,51 +4926,33 @@ func (m *Location) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MappingIndex", wireType) } - m.MappingIndex = 0 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.MappingIndex |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 3: + m.MappingIndex_ = &Location_MappingIndex{v} + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } m.Address = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4427,14 +4964,14 @@ func (m *Location) Unmarshal(dAtA []byte) error { break } } - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4447,11 +4984,11 @@ func (m *Location) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -4461,14 +4998,14 @@ func (m *Location) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsFolded", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4481,48 +5018,29 @@ func (m *Location) Unmarshal(dAtA []byte) error { } } m.IsFolded = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeIndex", wireType) - } - m.TypeIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TypeIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: + case 5: if wireType == 0 { - var v uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Attributes = append(m.Attributes, v) + m.AttributeIndices = append(m.AttributeIndices, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4535,11 +5053,11 @@ func (m *Location) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if postIndex > l { return io.ErrUnexpectedEOF @@ -4552,38 +5070,38 @@ func (m *Location) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.Attributes) == 0 { - m.Attributes = make([]uint64, 0, elementCount) + if elementCount != 0 && len(m.AttributeIndices) == 0 { + m.AttributeIndices = make([]int32, 0, elementCount) } for iNdEx < postIndex { - var v uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Attributes = append(m.Attributes, v) + m.AttributeIndices = append(m.AttributeIndices, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4605,7 +5123,7 @@ func (m *Line) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4633,14 +5151,14 @@ func (m *Line) Unmarshal(dAtA []byte) error { m.FunctionIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.FunctionIndex |= uint64(b&0x7F) << shift + m.FunctionIndex |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -4652,7 +5170,7 @@ func (m *Line) Unmarshal(dAtA []byte) error { m.Line = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4671,7 +5189,7 @@ func (m *Line) Unmarshal(dAtA []byte) error { m.Column = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4685,12 +5203,12 @@ func (m *Line) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4712,7 +5230,7 @@ func (m *Function) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4735,88 +5253,69 @@ func (m *Function) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NameStrindex", wireType) } - m.Id = 0 + m.NameStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Id |= uint64(b&0x7F) << shift + m.NameStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SystemNameStrindex", wireType) } - m.Name = 0 + m.SystemNameStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.Name |= int64(b&0x7F) << shift + m.SystemNameStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SystemName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) } - m.SystemName = 0 + m.FilenameStrindex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.SystemName |= int64(b&0x7F) << shift + m.FilenameStrindex |= int32(b&0x7F) << shift if b < 0x80 { break } } case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) - } - m.Filename = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPprofextended - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Filename |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) } m.StartLine = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPprofextended + return ErrIntOverflowProfiles } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4830,12 +5329,12 @@ func (m *Function) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipPprofextended(dAtA[iNdEx:]) + skippy, err := skipProfiles(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPprofextended + return ErrInvalidLengthProfiles } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4849,7 +5348,7 @@ func (m *Function) Unmarshal(dAtA []byte) error { } return nil } -func skipPprofextended(dAtA []byte) (n int, err error) { +func skipProfiles(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -4857,7 +5356,7 @@ func skipPprofextended(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowPprofextended + return 0, ErrIntOverflowProfiles } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -4874,7 +5373,7 @@ func skipPprofextended(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowPprofextended + return 0, ErrIntOverflowProfiles } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -4890,7 +5389,7 @@ func skipPprofextended(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowPprofextended + return 0, ErrIntOverflowProfiles } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -4903,14 +5402,14 @@ func skipPprofextended(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthPprofextended + return 0, ErrInvalidLengthProfiles } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPprofextended + return 0, ErrUnexpectedEndOfGroupProfiles } depth-- case 5: @@ -4919,7 +5418,7 @@ func skipPprofextended(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthPprofextended + return 0, ErrInvalidLengthProfiles } if depth == 0 { return iNdEx, nil @@ -4929,7 +5428,7 @@ func skipPprofextended(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthPprofextended = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPprofextended = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPprofextended = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthProfiles = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProfiles = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProfiles = fmt.Errorf("proto: unexpected end of group") ) diff --git a/api/otlp/profiles/v1experimental/profiles.pb.go b/api/otlp/profiles/v1experimental/profiles.pb.go deleted file mode 100644 index 26870dc6bd..0000000000 --- a/api/otlp/profiles/v1experimental/profiles.pb.go +++ /dev/null @@ -1,1552 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/profiles/v1experimental/profiles.proto - -package v1experimental - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - v11 "github.com/grafana/pyroscope/api/otlp/common/v1" - v1 "github.com/grafana/pyroscope/api/otlp/resource/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ProfilesData represents the profiles data that can be stored in persistent storage, -// OR can be embedded by other protocols that transfer OTLP profiles data but do not -// implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type ProfilesData struct { - // An array of ResourceProfiles. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` -} - -func (m *ProfilesData) Reset() { *m = ProfilesData{} } -func (m *ProfilesData) String() string { return proto.CompactTextString(m) } -func (*ProfilesData) ProtoMessage() {} -func (*ProfilesData) Descriptor() ([]byte, []int) { - return fileDescriptor_394731f2296acea3, []int{0} -} -func (m *ProfilesData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProfilesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProfilesData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProfilesData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfilesData.Merge(m, src) -} -func (m *ProfilesData) XXX_Size() int { - return m.Size() -} -func (m *ProfilesData) XXX_DiscardUnknown() { - xxx_messageInfo_ProfilesData.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfilesData proto.InternalMessageInfo - -func (m *ProfilesData) GetResourceProfiles() []*ResourceProfiles { - if m != nil { - return m.ResourceProfiles - } - return nil -} - -// A collection of ScopeProfiles from a Resource. -type ResourceProfiles struct { - DeprecatedScopeProfiles []*ScopeProfiles `protobuf:"bytes,1000,rep,name=deprecated_scope_profiles,json=deprecatedScopeProfiles,proto3" json:"deprecated_scope_profiles,omitempty"` - // The resource for the profiles in this message. - // If this field is not set then no resource info is known. - Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of ScopeProfiles that originate from a resource. - ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_profiles" field which have their own schema_url field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ResourceProfiles) Reset() { *m = ResourceProfiles{} } -func (m *ResourceProfiles) String() string { return proto.CompactTextString(m) } -func (*ResourceProfiles) ProtoMessage() {} -func (*ResourceProfiles) Descriptor() ([]byte, []int) { - return fileDescriptor_394731f2296acea3, []int{1} -} -func (m *ResourceProfiles) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceProfiles.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceProfiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceProfiles.Merge(m, src) -} -func (m *ResourceProfiles) XXX_Size() int { - return m.Size() -} -func (m *ResourceProfiles) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceProfiles.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceProfiles proto.InternalMessageInfo - -func (m *ResourceProfiles) GetDeprecatedScopeProfiles() []*ScopeProfiles { - if m != nil { - return m.DeprecatedScopeProfiles - } - return nil -} - -func (m *ResourceProfiles) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles { - if m != nil { - return m.ScopeProfiles - } - return nil -} - -func (m *ResourceProfiles) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of ProfileContainers produced by an InstrumentationScope. -type ScopeProfiles struct { - // The instrumentation scope information for the profiles in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // A list of ProfileContainers that originate from an instrumentation scope. - Profiles []*ProfileContainer `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the metric data - // is recorded in. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all profiles in the "profiles" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeProfiles) Reset() { *m = ScopeProfiles{} } -func (m *ScopeProfiles) String() string { return proto.CompactTextString(m) } -func (*ScopeProfiles) ProtoMessage() {} -func (*ScopeProfiles) Descriptor() ([]byte, []int) { - return fileDescriptor_394731f2296acea3, []int{2} -} -func (m *ScopeProfiles) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeProfiles.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeProfiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeProfiles.Merge(m, src) -} -func (m *ScopeProfiles) XXX_Size() int { - return m.Size() -} -func (m *ScopeProfiles) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeProfiles.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeProfiles proto.InternalMessageInfo - -func (m *ScopeProfiles) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeProfiles) GetProfiles() []*ProfileContainer { - if m != nil { - return m.Profiles - } - return nil -} - -func (m *ScopeProfiles) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A ProfileContainer represents a single profile. It wraps pprof profile with OpenTelemetry specific metadata. -type ProfileContainer struct { - // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with - // all zeroes is considered invalid. - // - // This field is required. - ProfileId []byte `protobuf:"bytes,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` - // start_time_unix_nano is the start time of the profile. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // end_time_unix_nano is the end time of the profile. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - EndTimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` - // attributes is a collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "abc.com/myattribute": true - // "abc.com/score": 10.239 - // - // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes"` - // 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. - DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] - OriginalPayloadFormat string `protobuf:"bytes,6,opt,name=original_payload_format,json=originalPayloadFormat,proto3" json:"original_payload_format,omitempty"` - // Original payload can be stored in this field. This can be useful for users who want to get the original payload. - // Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. - // Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. - // If the original payload is in pprof format, it SHOULD not be included in this field. - // The field is optional, however if it is present `profile` MUST be present and contain the same profiling information. - OriginalPayload []byte `protobuf:"bytes,7,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"` - // This is a reference to a pprof profile. Required, even when original_payload is present. - Profile *Profile `protobuf:"bytes,8,opt,name=profile,proto3" json:"profile,omitempty"` -} - -func (m *ProfileContainer) Reset() { *m = ProfileContainer{} } -func (m *ProfileContainer) String() string { return proto.CompactTextString(m) } -func (*ProfileContainer) ProtoMessage() {} -func (*ProfileContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_394731f2296acea3, []int{3} -} -func (m *ProfileContainer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProfileContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProfileContainer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProfileContainer) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfileContainer.Merge(m, src) -} -func (m *ProfileContainer) XXX_Size() int { - return m.Size() -} -func (m *ProfileContainer) XXX_DiscardUnknown() { - xxx_messageInfo_ProfileContainer.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfileContainer proto.InternalMessageInfo - -func (m *ProfileContainer) GetProfileId() []byte { - if m != nil { - return m.ProfileId - } - return nil -} - -func (m *ProfileContainer) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *ProfileContainer) GetEndTimeUnixNano() uint64 { - if m != nil { - return m.EndTimeUnixNano - } - return 0 -} - -func (m *ProfileContainer) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *ProfileContainer) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *ProfileContainer) GetOriginalPayloadFormat() string { - if m != nil { - return m.OriginalPayloadFormat - } - return "" -} - -func (m *ProfileContainer) GetOriginalPayload() []byte { - if m != nil { - return m.OriginalPayload - } - return nil -} - -func (m *ProfileContainer) GetProfile() *Profile { - if m != nil { - return m.Profile - } - return nil -} - -func init() { - proto.RegisterType((*ProfilesData)(nil), "opentelemetry.proto.profiles.v1experimental.ProfilesData") - proto.RegisterType((*ResourceProfiles)(nil), "opentelemetry.proto.profiles.v1experimental.ResourceProfiles") - proto.RegisterType((*ScopeProfiles)(nil), "opentelemetry.proto.profiles.v1experimental.ScopeProfiles") - proto.RegisterType((*ProfileContainer)(nil), "opentelemetry.proto.profiles.v1experimental.ProfileContainer") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/profiles/v1experimental/profiles.proto", fileDescriptor_394731f2296acea3) -} - -var fileDescriptor_394731f2296acea3 = []byte{ - // 664 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xdf, 0x4b, 0x1b, 0x4b, - 0x14, 0xce, 0x26, 0xfe, 0x1c, 0xcd, 0x35, 0x0e, 0xde, 0xeb, 0x5e, 0xe1, 0xe6, 0x06, 0x5f, 0x1a, - 0x2b, 0xec, 0x12, 0x2d, 0xa5, 0x08, 0x52, 0xaa, 0x6d, 0x41, 0xa4, 0x1a, 0xb6, 0x2a, 0xb4, 0x2f, - 0xcb, 0x98, 0x3d, 0xc6, 0x29, 0xbb, 0x33, 0xcb, 0xec, 0x6c, 0x9a, 0xf4, 0xaf, 0xe8, 0xdf, 0xd1, - 0x3f, 0xa4, 0x08, 0x7d, 0xf1, 0xb1, 0xf8, 0x50, 0x8a, 0xbe, 0xf4, 0xcf, 0x28, 0x3b, 0x3b, 0xbb, - 0x9a, 0x25, 0x45, 0xd2, 0xbe, 0x84, 0xe1, 0x7c, 0xdf, 0xf9, 0xce, 0xf7, 0x9d, 0x3d, 0x04, 0x6d, - 0xf1, 0x10, 0x98, 0x04, 0x1f, 0x02, 0x90, 0x62, 0x60, 0x87, 0x82, 0x4b, 0x9e, 0xfc, 0x9e, 0x51, - 0x1f, 0x22, 0xbb, 0xd7, 0x82, 0x7e, 0x08, 0x82, 0x06, 0xc0, 0x24, 0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0x1b, 0x46, 0xb3, 0xea, 0xfc, 0xa3, 0xf1, 0x67, 0x39, - 0xbc, 0x9b, 0xa0, 0xf8, 0x31, 0x5a, 0xe6, 0x82, 0x76, 0x29, 0x23, 0xbe, 0x1b, 0x92, 0x81, 0xcf, - 0x89, 0xe7, 0x9e, 0x71, 0x11, 0x10, 0x69, 0x4e, 0xa9, 0x35, 0xfe, 0x9d, 0xc1, 0xed, 0x14, 0x7d, - 0xa9, 0x40, 0xbc, 0x86, 0x6a, 0xc5, 0x3e, 0x73, 0x5a, 0xed, 0x70, 0xa1, 0xd0, 0x80, 0x0f, 0xd0, - 0xb4, 0x5e, 0xab, 0x39, 0xa3, 0x4e, 0xe9, 0xd1, 0xef, 0x7c, 0x76, 0x27, 0x13, 0xd9, 0xf9, 0x6c, - 0x5c, 0x5c, 0xd7, 0x8d, 0xcb, 0xeb, 0xba, 0xf1, 0xfd, 0xba, 0x6e, 0x7c, 0xbc, 0xa9, 0x97, 0x2e, - 0x6f, 0xea, 0xa5, 0xaf, 0x37, 0xf5, 0x12, 0xb2, 0x28, 0x1f, 0x47, 0x7b, 0xa7, 0x9a, 0x5d, 0x7b, - 0x3b, 0xa1, 0xb5, 0x8d, 0xb7, 0xdb, 0x5d, 0x2a, 0xcf, 0xe3, 0xd3, 0x64, 0xeb, 0x76, 0x57, 0x90, - 0x33, 0xc2, 0x88, 0x1d, 0x0e, 0x04, 0x57, 0x17, 0x6c, 0x93, 0x90, 0xda, 0x5c, 0xfa, 0xe1, 0xaf, - 0xfe, 0x32, 0x3f, 0x95, 0xd7, 0x0f, 0x43, 0x60, 0x47, 0xf9, 0x74, 0x25, 0x9b, 0x25, 0x88, 0xac, - 0x93, 0xd6, 0x8b, 0x3b, 0xec, 0xd3, 0x29, 0x65, 0x6e, 0xf3, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xc9, 0x55, 0x69, 0x06, 0x71, 0x06, 0x00, 0x00, -} - -func (m *ProfilesData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProfilesData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProfilesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceProfiles) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceProfiles) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeProfiles) > 0 { - for iNdEx := len(m.DeprecatedScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeProfiles) > 0 { - for iNdEx := len(m.ScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeProfiles) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeProfiles) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Profiles) > 0 { - for iNdEx := len(m.Profiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Profiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ProfileContainer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProfileContainer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProfileContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Profile != nil { - { - size, err := m.Profile.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.OriginalPayload) > 0 { - i -= len(m.OriginalPayload) - copy(dAtA[i:], m.OriginalPayload) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayload))) - i-- - dAtA[i] = 0x3a - } - if len(m.OriginalPayloadFormat) > 0 { - i -= len(m.OriginalPayloadFormat) - copy(dAtA[i:], m.OriginalPayloadFormat) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayloadFormat))) - i-- - dAtA[i] = 0x32 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.EndTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.ProfileId) > 0 { - i -= len(m.ProfileId) - copy(dAtA[i:], m.ProfileId) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.ProfileId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintProfiles(dAtA []byte, offset int, v uint64) int { - offset -= sovProfiles(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ProfilesData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for _, e := range m.ResourceProfiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - return n -} - -func (m *ResourceProfiles) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovProfiles(uint64(l)) - if len(m.ScopeProfiles) > 0 { - for _, e := range m.ScopeProfiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - if len(m.DeprecatedScopeProfiles) > 0 { - for _, e := range m.DeprecatedScopeProfiles { - l = e.Size() - n += 2 + l + sovProfiles(uint64(l)) - } - } - return n -} - -func (m *ScopeProfiles) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovProfiles(uint64(l)) - if len(m.Profiles) > 0 { - for _, e := range m.Profiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - return n -} - -func (m *ProfileContainer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProfileId) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.EndTimeUnixNano != 0 { - n += 9 - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovProfiles(uint64(m.DroppedAttributesCount)) - } - l = len(m.OriginalPayloadFormat) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - l = len(m.OriginalPayload) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - if m.Profile != nil { - l = m.Profile.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - return n -} - -func sovProfiles(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProfiles(x uint64) (n int) { - return sovProfiles(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ProfilesData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProfilesData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProfilesData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceProfiles = append(m.ResourceProfiles, &ResourceProfiles{}) - if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceProfiles) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceProfiles: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceProfiles: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeProfiles = append(m.ScopeProfiles, &ScopeProfiles{}) - if err := m.ScopeProfiles[len(m.ScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeProfiles = append(m.DeprecatedScopeProfiles, &ScopeProfiles{}) - if err := m.DeprecatedScopeProfiles[len(m.DeprecatedScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeProfiles) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeProfiles: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeProfiles: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Profiles = append(m.Profiles, &ProfileContainer{}) - if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProfileContainer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProfileContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProfileContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProfileId = append(m.ProfileId[:0], dAtA[iNdEx:postIndex]...) - if m.ProfileId == nil { - m.ProfileId = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) - } - m.EndTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalPayloadFormat = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalPayload = append(m.OriginalPayload[:0], dAtA[iNdEx:postIndex]...) - if m.OriginalPayload == nil { - m.OriginalPayload = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Profile == nil { - m.Profile = &Profile{} - } - if err := m.Profile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProfiles(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProfiles - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProfiles - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProfiles - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProfiles = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProfiles = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProfiles = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/otlp/proto_patch.sed b/api/otlp/proto_patch.sed index e1274f2dfd..9b128f5870 100644 --- a/api/otlp/proto_patch.sed +++ b/api/otlp/proto_patch.sed @@ -4,7 +4,7 @@ s+package opentelemetry.proto.\(.*\).v1;+package opentelemetry.proto.\1.v1;\ \ import "gogoproto/gogo.proto";+g -s+package opentelemetry.proto.\(.*\).v1experimental;+package opentelemetry.proto.\1.v1experimental;\ +s+package opentelemetry.proto.\(.*\).v1development;+package opentelemetry.proto.\1.v1development;\ \ import "gogoproto/gogo.proto";+g diff --git a/pkg/api/api.go b/pkg/api/api.go index 794f1769d2..b1a47bb561 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -229,7 +229,7 @@ func (a *API) RegisterDistributor(d *distributor.Distributor, multitenancyEnable {Desc: "Ring status", Path: "/distributor/ring"}, }) - a.RegisterRoute("/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", otlpHandler, true, true, "POST") + a.RegisterRoute("/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", otlpHandler, true, true, "POST") // TODO(@petethepig): implement http/protobuf and http/json support // a.RegisterRoute("/v1/profiles", otlpHandler, true, true, "POST") diff --git a/pkg/ingester/otlp/convert.go b/pkg/ingester/otlp/convert.go index b7314caa90..0a23adb9ca 100644 --- a/pkg/ingester/otlp/convert.go +++ b/pkg/ingester/otlp/convert.go @@ -5,7 +5,7 @@ import ( "time" googleProfile "github.com/grafana/pyroscope/api/gen/proto/go/google/v1" - otelProfile "github.com/grafana/pyroscope/api/otlp/profiles/v1experimental" + otelProfile "github.com/grafana/pyroscope/api/otlp/profiles/v1development" ) const serviceNameKey = "service.name" @@ -51,18 +51,15 @@ func newProfileBuilder(src *otelProfile.Profile) *profileBuilder { mappingMap: make(map[*otelProfile.Mapping]uint64), unsymbolziedFuncNameMap: make(map[string]uint64), dst: &googleProfile.Profile{ - TimeNanos: src.TimeNanos, - DurationNanos: src.DurationNanos, - Period: src.Period, - DefaultSampleType: src.DefaultSampleType, - DropFrames: src.DropFrames, - KeepFrames: src.KeepFrames, - Comment: src.Comment, + TimeNanos: src.TimeNanos, + DurationNanos: src.DurationNanos, + Period: src.Period, }, } res.addstr("") res.dst.SampleType = res.convertSampleTypesBack(src.SampleType) res.dst.PeriodType = res.convertValueTypeBack(src.PeriodType) + res.dst.DefaultSampleType = res.addstr(src.StringTable[src.DefaultSampleTypeStrindex]) if len(res.dst.SampleType) == 0 { res.dst.SampleType = []*googleProfile.ValueType{{ Type: res.addstr("samples"), @@ -119,7 +116,7 @@ func (p *profileBuilder) addfunc(s string) uint64 { } func serviceNameFromSample(p *otelProfile.Profile, sample *otelProfile.Sample) string { - for _, attributeIndex := range sample.Attributes { + for _, attributeIndex := range sample.AttributeIndices { attribute := p.AttributeTable[attributeIndex] if attribute.Key == serviceNameKey { return attribute.Value.GetStringValue() @@ -132,8 +129,8 @@ func (p *profileBuilder) convertSampleTypesBack(ost []*otelProfile.ValueType) [] var gst []*googleProfile.ValueType for _, st := range ost { gst = append(gst, &googleProfile.ValueType{ - Type: p.addstr(p.src.StringTable[st.Type]), - Unit: p.addstr(p.src.StringTable[st.Unit]), + Type: p.addstr(p.src.StringTable[st.TypeStrindex]), + Unit: p.addstr(p.src.StringTable[st.UnitStrindex]), }) } return gst @@ -144,8 +141,8 @@ func (p *profileBuilder) convertValueTypeBack(ovt *otelProfile.ValueType) *googl return nil } return &googleProfile.ValueType{ - Type: p.addstr(p.src.StringTable[ovt.Type]), - Unit: p.addstr(p.src.StringTable[ovt.Unit]), + Type: p.addstr(p.src.StringTable[ovt.TypeStrindex]), + Unit: p.addstr(p.src.StringTable[ovt.UnitStrindex]), } } @@ -153,7 +150,8 @@ func (p *profileBuilder) convertLocationBack(ol *otelProfile.Location) uint64 { if i, ok := p.locationMap[ol]; ok { return i } - om := p.src.Mapping[ol.MappingIndex] + lmi := ol.MappingIndex_.(*otelProfile.Location_MappingIndex) + om := p.src.MappingTable[lmi.MappingIndex] gl := &googleProfile.Location{ MappingId: p.convertMappingBack(om), Address: ol.Address, @@ -166,7 +164,7 @@ func (p *profileBuilder) convertLocationBack(ol *otelProfile.Location) uint64 { if len(gl.Line) == 0 { gl.Line = append(gl.Line, &googleProfile.Line{ - FunctionId: p.addfunc(fmt.Sprintf("%s 0x%x", p.src.StringTable[om.Filename], ol.Address)), + FunctionId: p.addfunc(fmt.Sprintf("%s 0x%x", p.src.StringTable[om.FilenameStrindex], ol.Address)), }) } @@ -179,7 +177,7 @@ func (p *profileBuilder) convertLocationBack(ol *otelProfile.Location) uint64 { // convertLineBack converts an OpenTelemetry Line to a Google Line. func (p *profileBuilder) convertLineBack(ol *otelProfile.Line) *googleProfile.Line { return &googleProfile.Line{ - FunctionId: p.convertFunctionBack(p.src.Function[ol.FunctionIndex]), + FunctionId: p.convertFunctionBack(p.src.FunctionTable[ol.FunctionIndex]), Line: ol.Line, } } @@ -189,9 +187,9 @@ func (p *profileBuilder) convertFunctionBack(of *otelProfile.Function) uint64 { return i } gf := &googleProfile.Function{ - Name: p.addstr(p.src.StringTable[of.Name]), - SystemName: p.addstr(p.src.StringTable[of.SystemName]), - Filename: p.addstr(p.src.StringTable[of.Filename]), + Name: p.addstr(p.src.StringTable[of.NameStrindex]), + SystemName: p.addstr(p.src.StringTable[of.SystemNameStrindex]), + Filename: p.addstr(p.src.StringTable[of.FilenameStrindex]), StartLine: of.StartLine, } p.dst.Function = append(p.dst.Function, gf) @@ -213,7 +211,7 @@ func (p *profileBuilder) convertSampleBack(os *otelProfile.Sample) *googleProfil p.convertSampleAttributesToLabelsBack(os, gs) for i := os.LocationsStartIndex; i < os.LocationsStartIndex+os.LocationsLength; i++ { - gs.LocationId = append(gs.LocationId, p.convertLocationBack(p.src.Location[p.src.LocationIndices[i]])) + gs.LocationId = append(gs.LocationId, p.convertLocationBack(p.src.LocationTable[p.src.LocationIndices[i]])) } p.dst.Sample = append(p.dst.Sample, gs) @@ -222,8 +220,8 @@ func (p *profileBuilder) convertSampleBack(os *otelProfile.Sample) *googleProfil } func (p *profileBuilder) convertSampleAttributesToLabelsBack(os *otelProfile.Sample, gs *googleProfile.Sample) { - gs.Label = make([]*googleProfile.Label, 0, len(os.Attributes)) - for _, attribute := range os.Attributes { + gs.Label = make([]*googleProfile.Label, 0, len(os.AttributeIndices)) + for _, attribute := range os.AttributeIndices { att := p.src.AttributeTable[attribute] if att.Key == serviceNameKey { continue @@ -243,12 +241,20 @@ func (p *profileBuilder) convertMappingBack(om *otelProfile.Mapping) uint64 { return i } + buildID := "" + for _, attributeIndex := range om.AttributeIndices { + attr := p.src.AttributeTable[attributeIndex] + fmt.Printf("%s %s\n", attr.Key, attr.Value.GetStringValue()) + if attr.Key == "process.executable.build_id.gnu" { + buildID = attr.Value.GetStringValue() + } + } gm := &googleProfile.Mapping{ MemoryStart: om.MemoryStart, MemoryLimit: om.MemoryLimit, FileOffset: om.FileOffset, - Filename: p.addstr(p.src.StringTable[om.Filename]), - BuildId: p.addstr(p.src.StringTable[om.BuildId]), + Filename: p.addstr(p.src.StringTable[om.FilenameStrindex]), + BuildId: p.addstr(buildID), HasFunctions: om.HasFunctions, HasFilenames: om.HasFilenames, HasLineNumbers: om.HasLineNumbers, diff --git a/pkg/ingester/otlp/ingest_handler.go b/pkg/ingester/otlp/ingest_handler.go index 085c3d5b32..651e12b01a 100644 --- a/pkg/ingester/otlp/ingest_handler.go +++ b/pkg/ingester/otlp/ingest_handler.go @@ -19,7 +19,7 @@ import ( pushv1 "github.com/grafana/pyroscope/api/gen/proto/go/push/v1" typesv1 "github.com/grafana/pyroscope/api/gen/proto/go/types/v1" - pprofileotlp "github.com/grafana/pyroscope/api/otlp/collector/profiles/v1experimental" + pprofileotlp "github.com/grafana/pyroscope/api/otlp/collector/profiles/v1development" v1 "github.com/grafana/pyroscope/api/otlp/common/v1" "github.com/grafana/pyroscope/pkg/tenant" ) @@ -97,14 +97,13 @@ func (h *ingestHandler) Export(ctx context.Context, er *pprofileotlp.ExportProfi for k := 0; k < len(sp.Profiles); k++ { p := sp.Profiles[k] - pprofProfiles := ConvertOtelToGoogle(p.Profile) + pprofProfiles := ConvertOtelToGoogle(p) for samplesServiceName, pprofProfile := range pprofProfiles { labels := getDefaultLabels() processedKeys := make(map[string]bool) labels = appendAttributesUnique(labels, rp.Resource.GetAttributes(), processedKeys) labels = appendAttributesUnique(labels, sp.Scope.GetAttributes(), processedKeys) - labels = appendAttributesUnique(labels, p.GetAttributes(), processedKeys) svc := samplesServiceName if svc == "" { svc = serviceName @@ -115,7 +114,7 @@ func (h *ingestHandler) Export(ctx context.Context, er *pprofileotlp.ExportProfi }) req := &distirbutormodel.PushRequest{ - RawProfileSize: p.Profile.Size(), + RawProfileSize: p.Size(), RawProfileType: distirbutormodel.RawProfileTypeOTEL, Series: []*distirbutormodel.ProfileSeries{ { diff --git a/pkg/ingester/otlp/ingest_handler_test.go b/pkg/ingester/otlp/ingest_handler_test.go index 64c7ea89be..4d8943ddff 100644 --- a/pkg/ingester/otlp/ingest_handler_test.go +++ b/pkg/ingester/otlp/ingest_handler_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - v1experimental2 "github.com/grafana/pyroscope/api/otlp/collector/profiles/v1experimental" - "github.com/grafana/pyroscope/api/otlp/profiles/v1experimental" + v1experimental2 "github.com/grafana/pyroscope/api/otlp/collector/profiles/v1development" + v1experimental "github.com/grafana/pyroscope/api/otlp/profiles/v1development" "github.com/grafana/pyroscope/pkg/og/convert/pprof/bench" "github.com/grafana/pyroscope/pkg/test/mocks/mockotlp" @@ -171,21 +171,21 @@ func TestSymbolizedFunctionNames(t *testing.T) { }).Return(nil, nil) otlpb := new(otlpbuilder) - otlpb.profile.Mapping = []*v1experimental.Mapping{{ - MemoryStart: 0x1000, - MemoryLimit: 0x1000, - Filename: otlpb.addstr("file1.so"), + otlpb.profile.MappingTable = []*v1experimental.Mapping{{ + MemoryStart: 0x1000, + MemoryLimit: 0x1000, + FilenameStrindex: otlpb.addstr("file1.so"), }} - otlpb.profile.Location = []*v1experimental.Location{{ - MappingIndex: 0, - Address: 0x1e0, - Line: nil, + otlpb.profile.LocationTable = []*v1experimental.Location{{ + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 0}, + Address: 0x1e0, + Line: nil, }, { - MappingIndex: 0, - Address: 0x2f0, - Line: nil, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 0}, + Address: 0x2f0, + Line: nil, }} - otlpb.profile.LocationIndices = []int64{0, 1} + otlpb.profile.LocationIndices = []int32{0, 1} otlpb.profile.Sample = []*v1experimental.Sample{{ LocationsStartIndex: 0, LocationsLength: 2, @@ -194,9 +194,9 @@ func TestSymbolizedFunctionNames(t *testing.T) { req := &v1experimental2.ExportProfilesServiceRequest{ ResourceProfiles: []*v1experimental.ResourceProfiles{{ ScopeProfiles: []*v1experimental.ScopeProfiles{{ - Profiles: []*v1experimental.ProfileContainer{{ - Profile: &otlpb.profile, - }}}}}}} + Profiles: []*v1experimental.Profile{ + &otlpb.profile, + }}}}}} logger := testutil.NewLogger(t) h := NewOTLPIngestHandler(svc, logger, false) _, err := h.Export(context.Background(), req) @@ -226,40 +226,40 @@ func TestSampleAttributes(t *testing.T) { }).Return(nil, nil) otlpb := new(otlpbuilder) - otlpb.profile.Mapping = []*v1experimental.Mapping{{ - MemoryStart: 0x1000, - MemoryLimit: 0x1000, - Filename: otlpb.addstr("firefox.so"), + otlpb.profile.MappingTable = []*v1experimental.Mapping{{ + MemoryStart: 0x1000, + MemoryLimit: 0x1000, + FilenameStrindex: otlpb.addstr("firefox.so"), }, { - MemoryStart: 0x1000, - MemoryLimit: 0x1000, - Filename: otlpb.addstr("chrome.so"), + MemoryStart: 0x1000, + MemoryLimit: 0x1000, + FilenameStrindex: otlpb.addstr("chrome.so"), }} - otlpb.profile.Location = []*v1experimental.Location{{ - MappingIndex: 0, - Address: 0x1e, + otlpb.profile.LocationTable = []*v1experimental.Location{{ + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 0}, + Address: 0x1e, }, { - MappingIndex: 0, - Address: 0x2e, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 0}, + Address: 0x2e, }, { - MappingIndex: 1, - Address: 0x3e, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 1}, + Address: 0x3e, }, { - MappingIndex: 1, - Address: 0x4e, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 1}, + Address: 0x4e, }} - otlpb.profile.LocationIndices = []int64{0, 1, 2, 3} + otlpb.profile.LocationIndices = []int32{0, 1, 2, 3} otlpb.profile.Sample = []*v1experimental.Sample{{ LocationsStartIndex: 0, LocationsLength: 2, Value: []int64{0xef}, - Attributes: []uint64{0}, + AttributeIndices: []int32{0}, }, { LocationsStartIndex: 2, LocationsLength: 2, Value: []int64{0xefef}, - Attributes: []uint64{1}, + AttributeIndices: []int32{1}, }} otlpb.profile.AttributeTable = []v1.KeyValue{{ Key: "process", @@ -279,9 +279,9 @@ func TestSampleAttributes(t *testing.T) { req := &v1experimental2.ExportProfilesServiceRequest{ ResourceProfiles: []*v1experimental.ResourceProfiles{{ ScopeProfiles: []*v1experimental.ScopeProfiles{{ - Profiles: []*v1experimental.ProfileContainer{{ - Profile: &otlpb.profile, - }}}}}}} + Profiles: []*v1experimental.Profile{ + &otlpb.profile, + }}}}}} logger := testutil.NewLogger(t) h := NewOTLPIngestHandler(svc, logger, false) _, err := h.Export(context.Background(), req) @@ -321,96 +321,96 @@ func TestDifferentServiceNames(t *testing.T) { }).Return(nil, nil) otlpb := new(otlpbuilder) - otlpb.profile.Mapping = []*v1experimental.Mapping{{ - MemoryStart: 0x1000, - MemoryLimit: 0x2000, - Filename: otlpb.addstr("service-a.so"), + otlpb.profile.MappingTable = []*v1experimental.Mapping{{ + MemoryStart: 0x1000, + MemoryLimit: 0x2000, + FilenameStrindex: otlpb.addstr("service-a.so"), }, { - MemoryStart: 0x2000, - MemoryLimit: 0x3000, - Filename: otlpb.addstr("service-b.so"), + MemoryStart: 0x2000, + MemoryLimit: 0x3000, + FilenameStrindex: otlpb.addstr("service-b.so"), }, { - MemoryStart: 0x4000, - MemoryLimit: 0x5000, - Filename: otlpb.addstr("service-c.so"), + MemoryStart: 0x4000, + MemoryLimit: 0x5000, + FilenameStrindex: otlpb.addstr("service-c.so"), }} - otlpb.profile.Location = []*v1experimental.Location{{ - MappingIndex: 0, // service-a.so - Address: 0x1100, + otlpb.profile.LocationTable = []*v1experimental.Location{{ + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 0}, // service-a.so + Address: 0x1100, Line: []*v1experimental.Line{{ FunctionIndex: 0, Line: 10, }}, }, { - MappingIndex: 0, // service-a.so - Address: 0x1200, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 0}, // service-a.so + Address: 0x1200, Line: []*v1experimental.Line{{ FunctionIndex: 1, Line: 20, }}, }, { - MappingIndex: 1, // service-b.so - Address: 0x2100, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 1}, // service-b.so + Address: 0x2100, Line: []*v1experimental.Line{{ FunctionIndex: 2, Line: 30, }}, }, { - MappingIndex: 1, // service-b.so - Address: 0x2200, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 1}, // service-b.so + Address: 0x2200, Line: []*v1experimental.Line{{ FunctionIndex: 3, Line: 40, }}, }, { - MappingIndex: 2, // service-c.so - Address: 0xef0, + MappingIndex_: &v1experimental.Location_MappingIndex{MappingIndex: 2}, // service-c.so + Address: 0xef0, Line: []*v1experimental.Line{{ FunctionIndex: 4, Line: 50, }}, }} - otlpb.profile.Function = []*v1experimental.Function{{ - Name: otlpb.addstr("serviceA_func1"), - SystemName: otlpb.addstr("serviceA_func1"), - Filename: otlpb.addstr("service_a.go"), + otlpb.profile.FunctionTable = []*v1experimental.Function{{ + NameStrindex: otlpb.addstr("serviceA_func1"), + SystemNameStrindex: otlpb.addstr("serviceA_func1"), + FilenameStrindex: otlpb.addstr("service_a.go"), }, { - Name: otlpb.addstr("serviceA_func2"), - SystemName: otlpb.addstr("serviceA_func2"), - Filename: otlpb.addstr("service_a.go"), + NameStrindex: otlpb.addstr("serviceA_func2"), + SystemNameStrindex: otlpb.addstr("serviceA_func2"), + FilenameStrindex: otlpb.addstr("service_a.go"), }, { - Name: otlpb.addstr("serviceB_func1"), - SystemName: otlpb.addstr("serviceB_func1"), - Filename: otlpb.addstr("service_b.go"), + NameStrindex: otlpb.addstr("serviceB_func1"), + SystemNameStrindex: otlpb.addstr("serviceB_func1"), + FilenameStrindex: otlpb.addstr("service_b.go"), }, { - Name: otlpb.addstr("serviceB_func2"), - SystemName: otlpb.addstr("serviceB_func2"), - Filename: otlpb.addstr("service_b.go"), + NameStrindex: otlpb.addstr("serviceB_func2"), + SystemNameStrindex: otlpb.addstr("serviceB_func2"), + FilenameStrindex: otlpb.addstr("service_b.go"), }, { - Name: otlpb.addstr("serviceC_func3"), - SystemName: otlpb.addstr("serviceC_func3"), - Filename: otlpb.addstr("service_c.go"), + NameStrindex: otlpb.addstr("serviceC_func3"), + SystemNameStrindex: otlpb.addstr("serviceC_func3"), + FilenameStrindex: otlpb.addstr("service_c.go"), }} - otlpb.profile.LocationIndices = []int64{0, 1, 2, 3, 4, 4} + otlpb.profile.LocationIndices = []int32{0, 1, 2, 3, 4, 4} otlpb.profile.Sample = []*v1experimental.Sample{{ LocationsStartIndex: 0, LocationsLength: 2, // Use first two locations Value: []int64{100}, - Attributes: []uint64{0}, + AttributeIndices: []int32{0}, }, { LocationsStartIndex: 2, LocationsLength: 2, Value: []int64{200}, - Attributes: []uint64{1}, + AttributeIndices: []int32{1}, }, { LocationsStartIndex: 4, LocationsLength: 2, Value: []int64{700}, - Attributes: []uint64{}, + AttributeIndices: []int32{}, }} otlpb.profile.AttributeTable = []v1.KeyValue{{ @@ -430,21 +430,21 @@ func TestDifferentServiceNames(t *testing.T) { }} otlpb.profile.SampleType = []*v1experimental.ValueType{{ - Type: otlpb.addstr("samples"), - Unit: otlpb.addstr("count"), + TypeStrindex: otlpb.addstr("samples"), + UnitStrindex: otlpb.addstr("count"), }} otlpb.profile.PeriodType = &v1experimental.ValueType{ - Type: otlpb.addstr("cpu"), - Unit: otlpb.addstr("nanoseconds"), + TypeStrindex: otlpb.addstr("cpu"), + UnitStrindex: otlpb.addstr("nanoseconds"), } otlpb.profile.Period = 10000000 // 10ms req := &v1experimental2.ExportProfilesServiceRequest{ ResourceProfiles: []*v1experimental.ResourceProfiles{{ ScopeProfiles: []*v1experimental.ScopeProfiles{{ - Profiles: []*v1experimental.ProfileContainer{{ - Profile: &otlpb.profile, - }}}}}}} + Profiles: []*v1experimental.Profile{ + &otlpb.profile, + }}}}}} logger := testutil.NewLogger(t) h := NewOTLPIngestHandler(svc, logger, false) @@ -494,17 +494,17 @@ func TestDifferentServiceNames(t *testing.T) { type otlpbuilder struct { profile v1experimental.Profile - stringmap map[string]int64 + stringmap map[string]int32 } -func (o *otlpbuilder) addstr(s string) int64 { +func (o *otlpbuilder) addstr(s string) int32 { if o.stringmap == nil { - o.stringmap = make(map[string]int64) + o.stringmap = make(map[string]int32) } if idx, ok := o.stringmap[s]; ok { return idx } - idx := int64(len(o.stringmap)) + idx := int32(len(o.stringmap)) o.stringmap[s] = idx o.profile.StringTable = append(o.profile.StringTable, s) return idx