From ea258cda783638c4a4f2eaf96894ffed5cf309a3 Mon Sep 17 00:00:00 2001 From: Guntur Akhmad Fauzi Date: Thu, 15 Aug 2024 17:48:44 +0700 Subject: [PATCH] fix(protobuf-deps): use latest grpc and protobuf --- v3/go.mod | 9 +- v3/internal/com_newrelic_trace_v1/README.md | 11 +- v3/internal/com_newrelic_trace_v1/v1.pb.go | 772 +++++++++--------- .../com_newrelic_trace_v1/v1_grpc.pb.go | 215 +++++ 4 files changed, 604 insertions(+), 403 deletions(-) create mode 100644 v3/internal/com_newrelic_trace_v1/v1_grpc.pb.go diff --git a/v3/go.mod b/v3/go.mod index 50c4379ff..9b3badbff 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -1,13 +1,14 @@ module github.com/newrelic/go-agent/v3 -go 1.20 +go 1.21 require ( - google.golang.org/protobuf v1.5.3 - google.golang.org/grpc v1.56.3 + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.34.2 ) - retract v3.22.0 // release process error corrected in v3.22.1 retract v3.25.0 // release process error corrected in v3.25.1 + +retract v3.34.0 // this release erronously referred to and invalid protobuf dependency diff --git a/v3/internal/com_newrelic_trace_v1/README.md b/v3/internal/com_newrelic_trace_v1/README.md index f628d709a..c24af93b5 100644 --- a/v3/internal/com_newrelic_trace_v1/README.md +++ b/v3/internal/com_newrelic_trace_v1/README.md @@ -4,14 +4,17 @@ To generate the `v1.pb.go` code, run the following from the top level `github.com/newrelic/go-agent` package: ``` -protoc --go_out=paths=source_relative,plugins=grpc:. v3/internal/com_newrelic_trace_v1/v1.proto +protoc --go_out=. --go_opt=paths=source_relative \ + --go-grpc_out=. --go-grpc_opt=paths=source_relative \ + v3/internal/com_newrelic_trace_v1/v1.proto ``` -Be mindful which version of `protoc-gen-go` you are using. Upgrade -`protoc-gen-go` to the latest with: +Be mindful which version of `protoc-gen-go` and `protoc-gen-go-grpc` you are using. +Upgrade both of these tools to the latest with: ``` -go get -u github.com/golang/protobuf/protoc-gen-go +go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest ``` ## When you regenerate the file diff --git a/v3/internal/com_newrelic_trace_v1/v1.pb.go b/v3/internal/com_newrelic_trace_v1/v1.pb.go index 7976ecb97..bee2b7b03 100644 --- a/v3/internal/com_newrelic_trace_v1/v1.pb.go +++ b/v3/internal/com_newrelic_trace_v1/v1.pb.go @@ -1,200 +1,191 @@ // Copyright 2020 New Relic Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -// +build go1.9 // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v5.27.3 // source: v3/internal/com_newrelic_trace_v1/v1.proto package com_newrelic_trace_v1 import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// 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.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type SpanBatch struct { - Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SpanBatch) Reset() { *m = SpanBatch{} } -func (m *SpanBatch) String() string { return proto.CompactTextString(m) } -func (*SpanBatch) ProtoMessage() {} -func (*SpanBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_10a7bb7b83f0c5c3, []int{0} + Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"` } -func (m *SpanBatch) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SpanBatch.Unmarshal(m, b) -} -func (m *SpanBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SpanBatch.Marshal(b, m, deterministic) -} -func (m *SpanBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpanBatch.Merge(m, src) +func (x *SpanBatch) Reset() { + *x = SpanBatch{} + if protoimpl.UnsafeEnabled { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SpanBatch) XXX_Size() int { - return xxx_messageInfo_SpanBatch.Size(m) + +func (x *SpanBatch) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpanBatch) XXX_DiscardUnknown() { - xxx_messageInfo_SpanBatch.DiscardUnknown(m) + +func (*SpanBatch) ProtoMessage() {} + +func (x *SpanBatch) ProtoReflect() protoreflect.Message { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpanBatch proto.InternalMessageInfo +// Deprecated: Use SpanBatch.ProtoReflect.Descriptor instead. +func (*SpanBatch) Descriptor() ([]byte, []int) { + return file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescGZIP(), []int{0} +} -func (m *SpanBatch) GetSpans() []*Span { - if m != nil { - return m.Spans +func (x *SpanBatch) GetSpans() []*Span { + if x != nil { + return x.Spans } return nil } type Span struct { - TraceId string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - Intrinsics map[string]*AttributeValue `protobuf:"bytes,2,rep,name=intrinsics,proto3" json:"intrinsics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - UserAttributes map[string]*AttributeValue `protobuf:"bytes,3,rep,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - AgentAttributes map[string]*AttributeValue `protobuf:"bytes,4,rep,name=agent_attributes,json=agentAttributes,proto3" json:"agent_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Span) Reset() { *m = Span{} } -func (m *Span) String() string { return proto.CompactTextString(m) } -func (*Span) ProtoMessage() {} -func (*Span) Descriptor() ([]byte, []int) { - return fileDescriptor_10a7bb7b83f0c5c3, []int{1} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TraceId string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + Intrinsics map[string]*AttributeValue `protobuf:"bytes,2,rep,name=intrinsics,proto3" json:"intrinsics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + UserAttributes map[string]*AttributeValue `protobuf:"bytes,3,rep,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + AgentAttributes map[string]*AttributeValue `protobuf:"bytes,4,rep,name=agent_attributes,json=agentAttributes,proto3" json:"agent_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Span) Reset() { + *x = Span{} + if protoimpl.UnsafeEnabled { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Span) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Span.Unmarshal(m, b) -} -func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Span.Marshal(b, m, deterministic) +func (x *Span) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Span) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span.Merge(m, src) -} -func (m *Span) XXX_Size() int { - return xxx_messageInfo_Span.Size(m) -} -func (m *Span) XXX_DiscardUnknown() { - xxx_messageInfo_Span.DiscardUnknown(m) + +func (*Span) ProtoMessage() {} + +func (x *Span) ProtoReflect() protoreflect.Message { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Span proto.InternalMessageInfo +// Deprecated: Use Span.ProtoReflect.Descriptor instead. +func (*Span) Descriptor() ([]byte, []int) { + return file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescGZIP(), []int{1} +} -func (m *Span) GetTraceId() string { - if m != nil { - return m.TraceId +func (x *Span) GetTraceId() string { + if x != nil { + return x.TraceId } return "" } -func (m *Span) GetIntrinsics() map[string]*AttributeValue { - if m != nil { - return m.Intrinsics +func (x *Span) GetIntrinsics() map[string]*AttributeValue { + if x != nil { + return x.Intrinsics } return nil } -func (m *Span) GetUserAttributes() map[string]*AttributeValue { - if m != nil { - return m.UserAttributes +func (x *Span) GetUserAttributes() map[string]*AttributeValue { + if x != nil { + return x.UserAttributes } return nil } -func (m *Span) GetAgentAttributes() map[string]*AttributeValue { - if m != nil { - return m.AgentAttributes +func (x *Span) GetAgentAttributes() map[string]*AttributeValue { + if x != nil { + return x.AgentAttributes } return nil } type AttributeValue struct { - // Types that are valid to be assigned to Value: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Value: // *AttributeValue_StringValue // *AttributeValue_BoolValue // *AttributeValue_IntValue // *AttributeValue_DoubleValue - Value isAttributeValue_Value `protobuf_oneof:"value"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttributeValue) Reset() { *m = AttributeValue{} } -func (m *AttributeValue) String() string { return proto.CompactTextString(m) } -func (*AttributeValue) ProtoMessage() {} -func (*AttributeValue) Descriptor() ([]byte, []int) { - return fileDescriptor_10a7bb7b83f0c5c3, []int{2} + Value isAttributeValue_Value `protobuf_oneof:"value"` } -func (m *AttributeValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttributeValue.Unmarshal(m, b) -} -func (m *AttributeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttributeValue.Marshal(b, m, deterministic) -} -func (m *AttributeValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttributeValue.Merge(m, src) -} -func (m *AttributeValue) XXX_Size() int { - return xxx_messageInfo_AttributeValue.Size(m) -} -func (m *AttributeValue) XXX_DiscardUnknown() { - xxx_messageInfo_AttributeValue.DiscardUnknown(m) +func (x *AttributeValue) Reset() { + *x = AttributeValue{} + if protoimpl.UnsafeEnabled { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var xxx_messageInfo_AttributeValue proto.InternalMessageInfo - -type isAttributeValue_Value interface { - isAttributeValue_Value() +func (x *AttributeValue) String() string { + return protoimpl.X.MessageStringOf(x) } -type AttributeValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` -} +func (*AttributeValue) ProtoMessage() {} -type AttributeValue_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` -} - -type AttributeValue_IntValue struct { - IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` +func (x *AttributeValue) ProtoReflect() protoreflect.Message { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type AttributeValue_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` +// Deprecated: Use AttributeValue.ProtoReflect.Descriptor instead. +func (*AttributeValue) Descriptor() ([]byte, []int) { + return file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescGZIP(), []int{2} } -func (*AttributeValue_StringValue) isAttributeValue_Value() {} - -func (*AttributeValue_BoolValue) isAttributeValue_Value() {} - -func (*AttributeValue_IntValue) isAttributeValue_Value() {} - -func (*AttributeValue_DoubleValue) isAttributeValue_Value() {} - func (m *AttributeValue) GetValue() isAttributeValue_Value { if m != nil { return m.Value @@ -202,319 +193,310 @@ func (m *AttributeValue) GetValue() isAttributeValue_Value { return nil } -func (m *AttributeValue) GetStringValue() string { - if x, ok := m.GetValue().(*AttributeValue_StringValue); ok { +func (x *AttributeValue) GetStringValue() string { + if x, ok := x.GetValue().(*AttributeValue_StringValue); ok { return x.StringValue } return "" } -func (m *AttributeValue) GetBoolValue() bool { - if x, ok := m.GetValue().(*AttributeValue_BoolValue); ok { +func (x *AttributeValue) GetBoolValue() bool { + if x, ok := x.GetValue().(*AttributeValue_BoolValue); ok { return x.BoolValue } return false } -func (m *AttributeValue) GetIntValue() int64 { - if x, ok := m.GetValue().(*AttributeValue_IntValue); ok { +func (x *AttributeValue) GetIntValue() int64 { + if x, ok := x.GetValue().(*AttributeValue_IntValue); ok { return x.IntValue } return 0 } -func (m *AttributeValue) GetDoubleValue() float64 { - if x, ok := m.GetValue().(*AttributeValue_DoubleValue); ok { +func (x *AttributeValue) GetDoubleValue() float64 { + if x, ok := x.GetValue().(*AttributeValue_DoubleValue); ok { return x.DoubleValue } return 0 } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AttributeValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AttributeValue_StringValue)(nil), - (*AttributeValue_BoolValue)(nil), - (*AttributeValue_IntValue)(nil), - (*AttributeValue_DoubleValue)(nil), - } -} - -type RecordStatus struct { - MessagesSeen uint64 `protobuf:"varint,1,opt,name=messages_seen,json=messagesSeen,proto3" json:"messages_seen,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RecordStatus) Reset() { *m = RecordStatus{} } -func (m *RecordStatus) String() string { return proto.CompactTextString(m) } -func (*RecordStatus) ProtoMessage() {} -func (*RecordStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_10a7bb7b83f0c5c3, []int{3} -} - -func (m *RecordStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RecordStatus.Unmarshal(m, b) -} -func (m *RecordStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RecordStatus.Marshal(b, m, deterministic) -} -func (m *RecordStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecordStatus.Merge(m, src) -} -func (m *RecordStatus) XXX_Size() int { - return xxx_messageInfo_RecordStatus.Size(m) -} -func (m *RecordStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RecordStatus.DiscardUnknown(m) +type isAttributeValue_Value interface { + isAttributeValue_Value() } -var xxx_messageInfo_RecordStatus proto.InternalMessageInfo - -func (m *RecordStatus) GetMessagesSeen() uint64 { - if m != nil { - return m.MessagesSeen - } - return 0 +type AttributeValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` } -func init() { - proto.RegisterType((*SpanBatch)(nil), "com.newrelic.trace.v1.SpanBatch") - proto.RegisterType((*Span)(nil), "com.newrelic.trace.v1.Span") - proto.RegisterMapType((map[string]*AttributeValue)(nil), "com.newrelic.trace.v1.Span.AgentAttributesEntry") - proto.RegisterMapType((map[string]*AttributeValue)(nil), "com.newrelic.trace.v1.Span.IntrinsicsEntry") - proto.RegisterMapType((map[string]*AttributeValue)(nil), "com.newrelic.trace.v1.Span.UserAttributesEntry") - proto.RegisterType((*AttributeValue)(nil), "com.newrelic.trace.v1.AttributeValue") - proto.RegisterType((*RecordStatus)(nil), "com.newrelic.trace.v1.RecordStatus") -} - -func init() { - proto.RegisterFile("v3/internal/com_newrelic_trace_v1/v1.proto", fileDescriptor_10a7bb7b83f0c5c3) -} - -var fileDescriptor_10a7bb7b83f0c5c3 = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x61, 0x8b, 0x12, 0x41, - 0x18, 0xc7, 0x1d, 0xf5, 0x3a, 0x7d, 0xf4, 0xce, 0x63, 0x2a, 0x30, 0x23, 0x5a, 0x94, 0x60, 0x29, - 0xda, 0x3d, 0xf5, 0x4d, 0x14, 0x1c, 0x9d, 0x10, 0x28, 0xbd, 0x5b, 0x2b, 0xa2, 0xa0, 0x65, 0x5c, - 0x1f, 0xd6, 0x21, 0x9d, 0x95, 0x99, 0xd9, 0x8d, 0xfb, 0x3c, 0x7d, 0x96, 0xbe, 0x47, 0x1f, 0x25, - 0x76, 0x46, 0x3d, 0x3d, 0x3c, 0xe3, 0x5e, 0xdc, 0xbb, 0xdd, 0xe7, 0xf9, 0xff, 0x7f, 0xff, 0x79, - 0x06, 0x9e, 0x81, 0x97, 0x59, 0xdf, 0xe7, 0x42, 0xa3, 0x14, 0x6c, 0xee, 0x47, 0xc9, 0x22, 0x14, - 0xf8, 0x4b, 0xe2, 0x9c, 0x47, 0xa1, 0x96, 0x2c, 0xc2, 0x30, 0xeb, 0xfa, 0x59, 0xd7, 0x5b, 0xca, - 0x44, 0x27, 0xf4, 0x71, 0x94, 0x2c, 0xbc, 0x75, 0xdf, 0x33, 0x7d, 0x2f, 0xeb, 0xb6, 0x2f, 0xa0, - 0x3a, 0x5e, 0x32, 0x31, 0x60, 0x3a, 0x9a, 0xd1, 0x2e, 0x1c, 0xa9, 0x25, 0x13, 0xaa, 0x49, 0x9c, - 0x92, 0x5b, 0xeb, 0x3d, 0xf5, 0xf6, 0x7a, 0xbc, 0xdc, 0x10, 0x58, 0x65, 0xfb, 0x6f, 0x19, 0xca, - 0xf9, 0x3f, 0x7d, 0x02, 0x15, 0x1b, 0xca, 0xa7, 0x4d, 0xe2, 0x10, 0xb7, 0x1a, 0x1c, 0x9b, 0xff, - 0xd1, 0x94, 0x7e, 0x04, 0xe0, 0x42, 0x4b, 0x2e, 0x14, 0x8f, 0x54, 0xb3, 0x68, 0xd8, 0xaf, 0x0e, - 0xb0, 0xbd, 0xd1, 0x46, 0xfd, 0x41, 0x68, 0x79, 0x15, 0x6c, 0xd9, 0xe9, 0x57, 0x68, 0xa4, 0x0a, - 0x65, 0xc8, 0xb4, 0x96, 0x7c, 0x92, 0x6a, 0x54, 0xcd, 0x92, 0x21, 0xfa, 0x87, 0x88, 0x9f, 0x15, - 0xca, 0xcb, 0x8d, 0xc3, 0x52, 0x4f, 0xd3, 0x9d, 0x22, 0xfd, 0x0e, 0x67, 0x2c, 0x46, 0xa1, 0xb7, - 0xd1, 0x65, 0x83, 0x3e, 0x3f, 0x84, 0xbe, 0xcc, 0x3d, 0x37, 0xd9, 0x0d, 0xb6, 0x5b, 0x6d, 0x4d, - 0xa1, 0x71, 0x63, 0x2a, 0x7a, 0x06, 0xa5, 0x9f, 0x78, 0xb5, 0xba, 0xac, 0xfc, 0x93, 0xbe, 0x83, - 0xa3, 0x8c, 0xcd, 0x53, 0x6c, 0x16, 0x1d, 0xe2, 0xd6, 0x7a, 0x2f, 0x6e, 0x89, 0xdd, 0x60, 0xbf, - 0xe4, 0xe2, 0xc0, 0x7a, 0xde, 0x16, 0xdf, 0x90, 0xd6, 0x0c, 0x1e, 0xee, 0x99, 0xf4, 0x3e, 0x92, - 0x38, 0x3c, 0xda, 0x37, 0xf8, 0x3d, 0x44, 0xb5, 0x7f, 0x13, 0x38, 0xdd, 0xed, 0xd2, 0x0e, 0xd4, - 0x55, 0x7e, 0x99, 0x71, 0x68, 0xd1, 0x26, 0x6e, 0x58, 0x08, 0x6a, 0xb6, 0x6a, 0x45, 0xcf, 0x01, - 0x26, 0x49, 0x32, 0x0f, 0xaf, 0xd3, 0x2b, 0xc3, 0x42, 0x50, 0xcd, 0x6b, 0x56, 0xf0, 0x0c, 0xaa, - 0x5c, 0xe8, 0x55, 0xbf, 0xe4, 0x10, 0xb7, 0x34, 0x2c, 0x04, 0x15, 0x2e, 0xf4, 0x26, 0x64, 0x9a, - 0xa4, 0x93, 0x39, 0xae, 0x14, 0x65, 0x87, 0xb8, 0x24, 0x0f, 0xb1, 0x55, 0x23, 0x1a, 0x1c, 0xaf, - 0xa6, 0x6b, 0xf7, 0xa1, 0x1e, 0x60, 0x94, 0xc8, 0xe9, 0x58, 0x33, 0x9d, 0x2a, 0xda, 0x81, 0x93, - 0x05, 0x2a, 0xc5, 0x62, 0x54, 0xa1, 0x42, 0x14, 0xe6, 0x8c, 0xe5, 0xa0, 0xbe, 0x2e, 0x8e, 0x11, - 0x45, 0xef, 0x0f, 0x81, 0x93, 0x91, 0x88, 0x51, 0xe9, 0x31, 0xca, 0x8c, 0x47, 0x48, 0x3f, 0x01, - 0xac, 0x30, 0xf9, 0x52, 0x1d, 0xda, 0xc0, 0x56, 0xe7, 0x96, 0xe6, 0xf6, 0x31, 0xda, 0x05, 0x97, - 0x9c, 0x13, 0xfa, 0x03, 0x1a, 0xd7, 0x54, 0xbb, 0xeb, 0xce, 0x01, 0xb4, 0x51, 0xdc, 0x81, 0x3f, - 0x78, 0xff, 0xed, 0x22, 0xe6, 0x7a, 0x96, 0x4e, 0x72, 0x8b, 0xbf, 0xb6, 0xf8, 0x71, 0xf2, 0xda, - 0xec, 0x81, 0xff, 0xdf, 0x77, 0x6a, 0xf2, 0xc0, 0xbc, 0x52, 0xfd, 0x7f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x38, 0x06, 0x7c, 0x3d, 0xd3, 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// IngestServiceClient is the client API for IngestService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type IngestServiceClient interface { - // Accepts a stream of Span messages, and returns an irregular stream of - // RecordStatus messages. - RecordSpan(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanClient, error) - // Accepts a stream of SpanBatch messages, and returns an irregular - // stream of RecordStatus messages. This endpoint can be used to improve - // throughput when Span messages are small - RecordSpanBatch(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanBatchClient, error) -} - -type ingestServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewIngestServiceClient(cc grpc.ClientConnInterface) IngestServiceClient { - return &ingestServiceClient{cc} -} - -func (c *ingestServiceClient) RecordSpan(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanClient, error) { - stream, err := c.cc.NewStream(ctx, &_IngestService_serviceDesc.Streams[0], "/com.newrelic.trace.v1.IngestService/RecordSpan", opts...) - if err != nil { - return nil, err - } - x := &ingestServiceRecordSpanClient{stream} - return x, nil +type AttributeValue_BoolValue struct { + BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` } -type IngestService_RecordSpanClient interface { - Send(*Span) error - Recv() (*RecordStatus, error) - grpc.ClientStream +type AttributeValue_IntValue struct { + IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` } -type ingestServiceRecordSpanClient struct { - grpc.ClientStream +type AttributeValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` } -func (x *ingestServiceRecordSpanClient) Send(m *Span) error { - return x.ClientStream.SendMsg(m) -} +func (*AttributeValue_StringValue) isAttributeValue_Value() {} -func (x *ingestServiceRecordSpanClient) Recv() (*RecordStatus, error) { - m := new(RecordStatus) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +func (*AttributeValue_BoolValue) isAttributeValue_Value() {} -func (c *ingestServiceClient) RecordSpanBatch(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanBatchClient, error) { - stream, err := c.cc.NewStream(ctx, &_IngestService_serviceDesc.Streams[1], "/com.newrelic.trace.v1.IngestService/RecordSpanBatch", opts...) - if err != nil { - return nil, err - } - x := &ingestServiceRecordSpanBatchClient{stream} - return x, nil -} +func (*AttributeValue_IntValue) isAttributeValue_Value() {} -type IngestService_RecordSpanBatchClient interface { - Send(*SpanBatch) error - Recv() (*RecordStatus, error) - grpc.ClientStream -} +func (*AttributeValue_DoubleValue) isAttributeValue_Value() {} -type ingestServiceRecordSpanBatchClient struct { - grpc.ClientStream -} +type RecordStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *ingestServiceRecordSpanBatchClient) Send(m *SpanBatch) error { - return x.ClientStream.SendMsg(m) + MessagesSeen uint64 `protobuf:"varint,1,opt,name=messages_seen,json=messagesSeen,proto3" json:"messages_seen,omitempty"` } -func (x *ingestServiceRecordSpanBatchClient) Recv() (*RecordStatus, error) { - m := new(RecordStatus) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (x *RecordStatus) Reset() { + *x = RecordStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return m, nil } -// IngestServiceServer is the server API for IngestService service. -type IngestServiceServer interface { - // Accepts a stream of Span messages, and returns an irregular stream of - // RecordStatus messages. - RecordSpan(IngestService_RecordSpanServer) error - // Accepts a stream of SpanBatch messages, and returns an irregular - // stream of RecordStatus messages. This endpoint can be used to improve - // throughput when Span messages are small - RecordSpanBatch(IngestService_RecordSpanBatchServer) error +func (x *RecordStatus) String() string { + return protoimpl.X.MessageStringOf(x) } -// UnimplementedIngestServiceServer can be embedded to have forward compatible implementations. -type UnimplementedIngestServiceServer struct { -} - -func (*UnimplementedIngestServiceServer) RecordSpan(srv IngestService_RecordSpanServer) error { - return status.Errorf(codes.Unimplemented, "method RecordSpan not implemented") -} -func (*UnimplementedIngestServiceServer) RecordSpanBatch(srv IngestService_RecordSpanBatchServer) error { - return status.Errorf(codes.Unimplemented, "method RecordSpanBatch not implemented") -} - -func RegisterIngestServiceServer(s *grpc.Server, srv IngestServiceServer) { - s.RegisterService(&_IngestService_serviceDesc, srv) -} - -func _IngestService_RecordSpan_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(IngestServiceServer).RecordSpan(&ingestServiceRecordSpanServer{stream}) -} - -type IngestService_RecordSpanServer interface { - Send(*RecordStatus) error - Recv() (*Span, error) - grpc.ServerStream -} - -type ingestServiceRecordSpanServer struct { - grpc.ServerStream -} +func (*RecordStatus) ProtoMessage() {} -func (x *ingestServiceRecordSpanServer) Send(m *RecordStatus) error { - return x.ServerStream.SendMsg(m) -} - -func (x *ingestServiceRecordSpanServer) Recv() (*Span, error) { - m := new(Span) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err +func (x *RecordStatus) ProtoReflect() protoreflect.Message { + mi := &file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return m, nil -} - -func _IngestService_RecordSpanBatch_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(IngestServiceServer).RecordSpanBatch(&ingestServiceRecordSpanBatchServer{stream}) + return mi.MessageOf(x) } -type IngestService_RecordSpanBatchServer interface { - Send(*RecordStatus) error - Recv() (*SpanBatch, error) - grpc.ServerStream +// Deprecated: Use RecordStatus.ProtoReflect.Descriptor instead. +func (*RecordStatus) Descriptor() ([]byte, []int) { + return file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescGZIP(), []int{3} } -type ingestServiceRecordSpanBatchServer struct { - grpc.ServerStream +func (x *RecordStatus) GetMessagesSeen() uint64 { + if x != nil { + return x.MessagesSeen + } + return 0 } -func (x *ingestServiceRecordSpanBatchServer) Send(m *RecordStatus) error { - return x.ServerStream.SendMsg(m) -} +var File_v3_internal_com_newrelic_trace_v1_v1_proto protoreflect.FileDescriptor + +var file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x76, 0x33, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, + 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x5f, 0x76, 0x31, 0x2f, 0x76, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, + 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x22, 0x3e, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x31, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, + 0x61, 0x6e, 0x73, 0x22, 0xe0, 0x04, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x19, 0x0a, 0x08, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x72, 0x69, + 0x6e, 0x73, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, + 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x49, 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x73, + 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x72, 0x69, 0x6e, + 0x73, 0x69, 0x63, 0x73, 0x12, 0x58, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x75, 0x73, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x5b, + 0x0a, 0x10, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, + 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x64, 0x0a, 0x0f, 0x49, + 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x68, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, + 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x69, 0x0a, 0x14, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, + 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa3, 0x01, 0x0a, 0x0e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, + 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, + 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x33, 0x0a, 0x0c, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x65, + 0x6e, 0x32, 0xc5, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x70, 0x61, + 0x6e, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, + 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x1a, 0x23, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x5e, 0x0a, 0x0f, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x23, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, 0x69, 0x63, + 0x2f, 0x67, 0x6f, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x72, 0x65, 0x6c, + 0x69, 0x63, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescOnce sync.Once + file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescData = file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDesc +) -func (x *ingestServiceRecordSpanBatchServer) Recv() (*SpanBatch, error) { - m := new(SpanBatch) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err +func file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescGZIP() []byte { + file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescOnce.Do(func() { + file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescData = protoimpl.X.CompressGZIP(file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescData) + }) + return file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDescData +} + +var file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_v3_internal_com_newrelic_trace_v1_v1_proto_goTypes = []interface{}{ + (*SpanBatch)(nil), // 0: com.newrelic.trace.v1.SpanBatch + (*Span)(nil), // 1: com.newrelic.trace.v1.Span + (*AttributeValue)(nil), // 2: com.newrelic.trace.v1.AttributeValue + (*RecordStatus)(nil), // 3: com.newrelic.trace.v1.RecordStatus + nil, // 4: com.newrelic.trace.v1.Span.IntrinsicsEntry + nil, // 5: com.newrelic.trace.v1.Span.UserAttributesEntry + nil, // 6: com.newrelic.trace.v1.Span.AgentAttributesEntry +} +var file_v3_internal_com_newrelic_trace_v1_v1_proto_depIdxs = []int32{ + 1, // 0: com.newrelic.trace.v1.SpanBatch.spans:type_name -> com.newrelic.trace.v1.Span + 4, // 1: com.newrelic.trace.v1.Span.intrinsics:type_name -> com.newrelic.trace.v1.Span.IntrinsicsEntry + 5, // 2: com.newrelic.trace.v1.Span.user_attributes:type_name -> com.newrelic.trace.v1.Span.UserAttributesEntry + 6, // 3: com.newrelic.trace.v1.Span.agent_attributes:type_name -> com.newrelic.trace.v1.Span.AgentAttributesEntry + 2, // 4: com.newrelic.trace.v1.Span.IntrinsicsEntry.value:type_name -> com.newrelic.trace.v1.AttributeValue + 2, // 5: com.newrelic.trace.v1.Span.UserAttributesEntry.value:type_name -> com.newrelic.trace.v1.AttributeValue + 2, // 6: com.newrelic.trace.v1.Span.AgentAttributesEntry.value:type_name -> com.newrelic.trace.v1.AttributeValue + 1, // 7: com.newrelic.trace.v1.IngestService.RecordSpan:input_type -> com.newrelic.trace.v1.Span + 0, // 8: com.newrelic.trace.v1.IngestService.RecordSpanBatch:input_type -> com.newrelic.trace.v1.SpanBatch + 3, // 9: com.newrelic.trace.v1.IngestService.RecordSpan:output_type -> com.newrelic.trace.v1.RecordStatus + 3, // 10: com.newrelic.trace.v1.IngestService.RecordSpanBatch:output_type -> com.newrelic.trace.v1.RecordStatus + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_v3_internal_com_newrelic_trace_v1_v1_proto_init() } +func file_v3_internal_com_newrelic_trace_v1_v1_proto_init() { + if File_v3_internal_com_newrelic_trace_v1_v1_proto != nil { + return } - return m, nil -} - -var _IngestService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "com.newrelic.trace.v1.IngestService", - HandlerType: (*IngestServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "RecordSpan", - Handler: _IngestService_RecordSpan_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "RecordSpanBatch", - Handler: _IngestService_RecordSpanBatch_Handler, - ServerStreams: true, - ClientStreams: true, + if !protoimpl.UnsafeEnabled { + file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpanBatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Span); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributeValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecordStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*AttributeValue_StringValue)(nil), + (*AttributeValue_BoolValue)(nil), + (*AttributeValue_IntValue)(nil), + (*AttributeValue_DoubleValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, }, - }, - Metadata: "v3/internal/com_newrelic_trace_v1/v1.proto", + GoTypes: file_v3_internal_com_newrelic_trace_v1_v1_proto_goTypes, + DependencyIndexes: file_v3_internal_com_newrelic_trace_v1_v1_proto_depIdxs, + MessageInfos: file_v3_internal_com_newrelic_trace_v1_v1_proto_msgTypes, + }.Build() + File_v3_internal_com_newrelic_trace_v1_v1_proto = out.File + file_v3_internal_com_newrelic_trace_v1_v1_proto_rawDesc = nil + file_v3_internal_com_newrelic_trace_v1_v1_proto_goTypes = nil + file_v3_internal_com_newrelic_trace_v1_v1_proto_depIdxs = nil } diff --git a/v3/internal/com_newrelic_trace_v1/v1_grpc.pb.go b/v3/internal/com_newrelic_trace_v1/v1_grpc.pb.go new file mode 100644 index 000000000..e957e8959 --- /dev/null +++ b/v3/internal/com_newrelic_trace_v1/v1_grpc.pb.go @@ -0,0 +1,215 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.27.3 +// source: v3/internal/com_newrelic_trace_v1/v1.proto + +package com_newrelic_trace_v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// IngestServiceClient is the client API for IngestService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type IngestServiceClient interface { + // Accepts a stream of Span messages, and returns an irregular stream of + // RecordStatus messages. + RecordSpan(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanClient, error) + // Accepts a stream of SpanBatch messages, and returns an irregular + // stream of RecordStatus messages. This endpoint can be used to improve + // throughput when Span messages are small + RecordSpanBatch(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanBatchClient, error) +} + +type ingestServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewIngestServiceClient(cc grpc.ClientConnInterface) IngestServiceClient { + return &ingestServiceClient{cc} +} + +func (c *ingestServiceClient) RecordSpan(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanClient, error) { + stream, err := c.cc.NewStream(ctx, &IngestService_ServiceDesc.Streams[0], "/com.newrelic.trace.v1.IngestService/RecordSpan", opts...) + if err != nil { + return nil, err + } + x := &ingestServiceRecordSpanClient{stream} + return x, nil +} + +type IngestService_RecordSpanClient interface { + Send(*Span) error + Recv() (*RecordStatus, error) + grpc.ClientStream +} + +type ingestServiceRecordSpanClient struct { + grpc.ClientStream +} + +func (x *ingestServiceRecordSpanClient) Send(m *Span) error { + return x.ClientStream.SendMsg(m) +} + +func (x *ingestServiceRecordSpanClient) Recv() (*RecordStatus, error) { + m := new(RecordStatus) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *ingestServiceClient) RecordSpanBatch(ctx context.Context, opts ...grpc.CallOption) (IngestService_RecordSpanBatchClient, error) { + stream, err := c.cc.NewStream(ctx, &IngestService_ServiceDesc.Streams[1], "/com.newrelic.trace.v1.IngestService/RecordSpanBatch", opts...) + if err != nil { + return nil, err + } + x := &ingestServiceRecordSpanBatchClient{stream} + return x, nil +} + +type IngestService_RecordSpanBatchClient interface { + Send(*SpanBatch) error + Recv() (*RecordStatus, error) + grpc.ClientStream +} + +type ingestServiceRecordSpanBatchClient struct { + grpc.ClientStream +} + +func (x *ingestServiceRecordSpanBatchClient) Send(m *SpanBatch) error { + return x.ClientStream.SendMsg(m) +} + +func (x *ingestServiceRecordSpanBatchClient) Recv() (*RecordStatus, error) { + m := new(RecordStatus) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// IngestServiceServer is the server API for IngestService service. +// All implementations must embed UnimplementedIngestServiceServer +// for forward compatibility +type IngestServiceServer interface { + // Accepts a stream of Span messages, and returns an irregular stream of + // RecordStatus messages. + RecordSpan(IngestService_RecordSpanServer) error + // Accepts a stream of SpanBatch messages, and returns an irregular + // stream of RecordStatus messages. This endpoint can be used to improve + // throughput when Span messages are small + RecordSpanBatch(IngestService_RecordSpanBatchServer) error + mustEmbedUnimplementedIngestServiceServer() +} + +// UnimplementedIngestServiceServer must be embedded to have forward compatible implementations. +type UnimplementedIngestServiceServer struct { +} + +func (UnimplementedIngestServiceServer) RecordSpan(IngestService_RecordSpanServer) error { + return status.Errorf(codes.Unimplemented, "method RecordSpan not implemented") +} +func (UnimplementedIngestServiceServer) RecordSpanBatch(IngestService_RecordSpanBatchServer) error { + return status.Errorf(codes.Unimplemented, "method RecordSpanBatch not implemented") +} +func (UnimplementedIngestServiceServer) mustEmbedUnimplementedIngestServiceServer() {} + +// UnsafeIngestServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IngestServiceServer will +// result in compilation errors. +type UnsafeIngestServiceServer interface { + mustEmbedUnimplementedIngestServiceServer() +} + +func RegisterIngestServiceServer(s grpc.ServiceRegistrar, srv IngestServiceServer) { + s.RegisterService(&IngestService_ServiceDesc, srv) +} + +func _IngestService_RecordSpan_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(IngestServiceServer).RecordSpan(&ingestServiceRecordSpanServer{stream}) +} + +type IngestService_RecordSpanServer interface { + Send(*RecordStatus) error + Recv() (*Span, error) + grpc.ServerStream +} + +type ingestServiceRecordSpanServer struct { + grpc.ServerStream +} + +func (x *ingestServiceRecordSpanServer) Send(m *RecordStatus) error { + return x.ServerStream.SendMsg(m) +} + +func (x *ingestServiceRecordSpanServer) Recv() (*Span, error) { + m := new(Span) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _IngestService_RecordSpanBatch_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(IngestServiceServer).RecordSpanBatch(&ingestServiceRecordSpanBatchServer{stream}) +} + +type IngestService_RecordSpanBatchServer interface { + Send(*RecordStatus) error + Recv() (*SpanBatch, error) + grpc.ServerStream +} + +type ingestServiceRecordSpanBatchServer struct { + grpc.ServerStream +} + +func (x *ingestServiceRecordSpanBatchServer) Send(m *RecordStatus) error { + return x.ServerStream.SendMsg(m) +} + +func (x *ingestServiceRecordSpanBatchServer) Recv() (*SpanBatch, error) { + m := new(SpanBatch) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// IngestService_ServiceDesc is the grpc.ServiceDesc for IngestService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var IngestService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "com.newrelic.trace.v1.IngestService", + HandlerType: (*IngestServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "RecordSpan", + Handler: _IngestService_RecordSpan_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "RecordSpanBatch", + Handler: _IngestService_RecordSpanBatch_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "v3/internal/com_newrelic_trace_v1/v1.proto", +}