tracepb

package
v0.0.0-...-3b3056d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTracepb        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTracepb          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTracepb = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterTraceRecordPubSubServer

func RegisterTraceRecordPubSubServer(s *grpc.Server, srv TraceRecordPubSubServer)

Types

type NotifyCollect

type NotifyCollect struct {
	TraceId              uint64   `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Notify the subscriber to persis the spans of the trace.

func (*NotifyCollect) Descriptor

func (*NotifyCollect) Descriptor() ([]byte, []int)

func (*NotifyCollect) GetTraceId

func (m *NotifyCollect) GetTraceId() uint64

func (*NotifyCollect) Marshal

func (m *NotifyCollect) Marshal() (dAtA []byte, err error)

func (*NotifyCollect) MarshalTo

func (m *NotifyCollect) MarshalTo(dAtA []byte) (int, error)

func (*NotifyCollect) MarshalToSizedBuffer

func (m *NotifyCollect) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NotifyCollect) ProtoMessage

func (*NotifyCollect) ProtoMessage()

func (*NotifyCollect) Reset

func (m *NotifyCollect) Reset()

func (*NotifyCollect) Size

func (m *NotifyCollect) Size() (n int)

func (*NotifyCollect) String

func (m *NotifyCollect) String() string

func (*NotifyCollect) Unmarshal

func (m *NotifyCollect) Unmarshal(dAtA []byte) error

func (*NotifyCollect) XXX_DiscardUnknown

func (m *NotifyCollect) XXX_DiscardUnknown()

func (*NotifyCollect) XXX_Marshal

func (m *NotifyCollect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NotifyCollect) XXX_Merge

func (m *NotifyCollect) XXX_Merge(src proto.Message)

func (*NotifyCollect) XXX_Size

func (m *NotifyCollect) XXX_Size() int

func (*NotifyCollect) XXX_Unmarshal

func (m *NotifyCollect) XXX_Unmarshal(b []byte) error

type Property

type Property struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Property) Descriptor

func (*Property) Descriptor() ([]byte, []int)

func (*Property) GetKey

func (m *Property) GetKey() string

func (*Property) GetValue

func (m *Property) GetValue() string

func (*Property) Marshal

func (m *Property) Marshal() (dAtA []byte, err error)

func (*Property) MarshalTo

func (m *Property) MarshalTo(dAtA []byte) (int, error)

func (*Property) MarshalToSizedBuffer

func (m *Property) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) Reset

func (m *Property) Reset()

func (*Property) Size

func (m *Property) Size() (n int)

func (*Property) String

func (m *Property) String() string

func (*Property) Unmarshal

func (m *Property) Unmarshal(dAtA []byte) error

func (*Property) XXX_DiscardUnknown

func (m *Property) XXX_DiscardUnknown()

func (*Property) XXX_Marshal

func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Property) XXX_Merge

func (m *Property) XXX_Merge(src proto.Message)

func (*Property) XXX_Size

func (m *Property) XXX_Size() int

func (*Property) XXX_Unmarshal

func (m *Property) XXX_Unmarshal(b []byte) error

type RemoteParentSpan

type RemoteParentSpan struct {
	// A unique id to identify the request. It's usually a UUID.
	TraceId uint64 `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// The span of remote caller that is awaiting the request.
	SpanId               uint64   `protobuf:"varint,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoteParentSpan) Descriptor

func (*RemoteParentSpan) Descriptor() ([]byte, []int)

func (*RemoteParentSpan) GetSpanId

func (m *RemoteParentSpan) GetSpanId() uint64

func (*RemoteParentSpan) GetTraceId

func (m *RemoteParentSpan) GetTraceId() uint64

func (*RemoteParentSpan) Marshal

func (m *RemoteParentSpan) Marshal() (dAtA []byte, err error)

func (*RemoteParentSpan) MarshalTo

func (m *RemoteParentSpan) MarshalTo(dAtA []byte) (int, error)

func (*RemoteParentSpan) MarshalToSizedBuffer

func (m *RemoteParentSpan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RemoteParentSpan) ProtoMessage

func (*RemoteParentSpan) ProtoMessage()

func (*RemoteParentSpan) Reset

func (m *RemoteParentSpan) Reset()

func (*RemoteParentSpan) Size

func (m *RemoteParentSpan) Size() (n int)

func (*RemoteParentSpan) String

func (m *RemoteParentSpan) String() string

func (*RemoteParentSpan) Unmarshal

func (m *RemoteParentSpan) Unmarshal(dAtA []byte) error

func (*RemoteParentSpan) XXX_DiscardUnknown

func (m *RemoteParentSpan) XXX_DiscardUnknown()

func (*RemoteParentSpan) XXX_Marshal

func (m *RemoteParentSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoteParentSpan) XXX_Merge

func (m *RemoteParentSpan) XXX_Merge(src proto.Message)

func (*RemoteParentSpan) XXX_Size

func (m *RemoteParentSpan) XXX_Size() int

func (*RemoteParentSpan) XXX_Unmarshal

func (m *RemoteParentSpan) XXX_Unmarshal(b []byte) error

type Report

type Report struct {
	RemoteParentSpans    []*RemoteParentSpan `protobuf:"bytes,1,rep,name=remote_parent_spans,json=remoteParentSpans,proto3" json:"remote_parent_spans,omitempty"`
	Spans                []*Span             `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

Report the spans collected when handling a request on a service.

func (*Report) Descriptor

func (*Report) Descriptor() ([]byte, []int)

func (*Report) GetRemoteParentSpans

func (m *Report) GetRemoteParentSpans() []*RemoteParentSpan

func (*Report) GetSpans

func (m *Report) GetSpans() []*Span

func (*Report) Marshal

func (m *Report) Marshal() (dAtA []byte, err error)

func (*Report) MarshalTo

func (m *Report) MarshalTo(dAtA []byte) (int, error)

func (*Report) MarshalToSizedBuffer

func (m *Report) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Report) ProtoMessage

func (*Report) ProtoMessage()

func (*Report) Reset

func (m *Report) Reset()

func (*Report) Size

func (m *Report) Size() (n int)

func (*Report) String

func (m *Report) String() string

func (*Report) Unmarshal

func (m *Report) Unmarshal(dAtA []byte) error

func (*Report) XXX_DiscardUnknown

func (m *Report) XXX_DiscardUnknown()

func (*Report) XXX_Marshal

func (m *Report) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Report) XXX_Merge

func (m *Report) XXX_Merge(src proto.Message)

func (*Report) XXX_Size

func (m *Report) XXX_Size() int

func (*Report) XXX_Unmarshal

func (m *Report) XXX_Unmarshal(b []byte) error

type Span

type Span struct {
	// The unique span id within the spans with the same `trace_id`.
	// The most significant 32 bits should be random number generated by each service instance.
	SpanId               uint64      `protobuf:"varint,1,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	ParentId             uint64      `protobuf:"varint,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	BeginUnixNs          uint64      `protobuf:"varint,3,opt,name=begin_unix_ns,json=beginUnixNs,proto3" json:"begin_unix_ns,omitempty"`
	DurationNs           uint64      `protobuf:"varint,4,opt,name=duration_ns,json=durationNs,proto3" json:"duration_ns,omitempty"`
	Event                string      `protobuf:"bytes,5,opt,name=event,proto3" json:"event,omitempty"`
	Properties           []*Property `protobuf:"bytes,6,rep,name=properties,proto3" json:"properties,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Span) Descriptor

func (*Span) Descriptor() ([]byte, []int)

func (*Span) GetBeginUnixNs

func (m *Span) GetBeginUnixNs() uint64

func (*Span) GetDurationNs

func (m *Span) GetDurationNs() uint64

func (*Span) GetEvent

func (m *Span) GetEvent() string

func (*Span) GetParentId

func (m *Span) GetParentId() uint64

func (*Span) GetProperties

func (m *Span) GetProperties() []*Property

func (*Span) GetSpanId

func (m *Span) GetSpanId() uint64

func (*Span) Marshal

func (m *Span) Marshal() (dAtA []byte, err error)

func (*Span) MarshalTo

func (m *Span) MarshalTo(dAtA []byte) (int, error)

func (*Span) MarshalToSizedBuffer

func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) Reset

func (m *Span) Reset()

func (*Span) Size

func (m *Span) Size() (n int)

func (*Span) String

func (m *Span) String() string

func (*Span) Unmarshal

func (m *Span) Unmarshal(dAtA []byte) error

func (*Span) XXX_DiscardUnknown

func (m *Span) XXX_DiscardUnknown()

func (*Span) XXX_Marshal

func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Span) XXX_Merge

func (m *Span) XXX_Merge(src proto.Message)

func (*Span) XXX_Size

func (m *Span) XXX_Size() int

func (*Span) XXX_Unmarshal

func (m *Span) XXX_Unmarshal(b []byte) error

type TraceContext

type TraceContext struct {
	RemoteParentSpans []*RemoteParentSpan `protobuf:"bytes,1,rep,name=remote_parent_spans,json=remoteParentSpans,proto3" json:"remote_parent_spans,omitempty"`
	// Report the trace records only if the duration of handling the request exceeds the threshold.
	DurationThresholdMs  uint32   `protobuf:"varint,2,opt,name=duration_threshold_ms,json=durationThresholdMs,proto3" json:"duration_threshold_ms,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The context of the request to be traced.

func (*TraceContext) Descriptor

func (*TraceContext) Descriptor() ([]byte, []int)

func (*TraceContext) GetDurationThresholdMs

func (m *TraceContext) GetDurationThresholdMs() uint32

func (*TraceContext) GetRemoteParentSpans

func (m *TraceContext) GetRemoteParentSpans() []*RemoteParentSpan

func (*TraceContext) Marshal

func (m *TraceContext) Marshal() (dAtA []byte, err error)

func (*TraceContext) MarshalTo

func (m *TraceContext) MarshalTo(dAtA []byte) (int, error)

func (*TraceContext) MarshalToSizedBuffer

func (m *TraceContext) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceContext) ProtoMessage

func (*TraceContext) ProtoMessage()

func (*TraceContext) Reset

func (m *TraceContext) Reset()

func (*TraceContext) Size

func (m *TraceContext) Size() (n int)

func (*TraceContext) String

func (m *TraceContext) String() string

func (*TraceContext) Unmarshal

func (m *TraceContext) Unmarshal(dAtA []byte) error

func (*TraceContext) XXX_DiscardUnknown

func (m *TraceContext) XXX_DiscardUnknown()

func (*TraceContext) XXX_Marshal

func (m *TraceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceContext) XXX_Merge

func (m *TraceContext) XXX_Merge(src proto.Message)

func (*TraceContext) XXX_Size

func (m *TraceContext) XXX_Size() int

func (*TraceContext) XXX_Unmarshal

func (m *TraceContext) XXX_Unmarshal(b []byte) error

type TraceRecord

type TraceRecord struct {
	// Types that are valid to be assigned to RecordOneof:
	//	*TraceRecord_Report
	//	*TraceRecord_NotifyCollect
	RecordOneof          isTraceRecord_RecordOneof `protobuf_oneof:"record_oneof"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*TraceRecord) Descriptor

func (*TraceRecord) Descriptor() ([]byte, []int)

func (*TraceRecord) GetNotifyCollect

func (m *TraceRecord) GetNotifyCollect() *NotifyCollect

func (*TraceRecord) GetRecordOneof

func (m *TraceRecord) GetRecordOneof() isTraceRecord_RecordOneof

func (*TraceRecord) GetReport

func (m *TraceRecord) GetReport() *Report

func (*TraceRecord) Marshal

func (m *TraceRecord) Marshal() (dAtA []byte, err error)

func (*TraceRecord) MarshalTo

func (m *TraceRecord) MarshalTo(dAtA []byte) (int, error)

func (*TraceRecord) MarshalToSizedBuffer

func (m *TraceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceRecord) ProtoMessage

func (*TraceRecord) ProtoMessage()

func (*TraceRecord) Reset

func (m *TraceRecord) Reset()

func (*TraceRecord) Size

func (m *TraceRecord) Size() (n int)

func (*TraceRecord) String

func (m *TraceRecord) String() string

func (*TraceRecord) Unmarshal

func (m *TraceRecord) Unmarshal(dAtA []byte) error

func (*TraceRecord) XXX_DiscardUnknown

func (m *TraceRecord) XXX_DiscardUnknown()

func (*TraceRecord) XXX_Marshal

func (m *TraceRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceRecord) XXX_Merge

func (m *TraceRecord) XXX_Merge(src proto.Message)

func (*TraceRecord) XXX_OneofWrappers

func (*TraceRecord) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*TraceRecord) XXX_Size

func (m *TraceRecord) XXX_Size() int

func (*TraceRecord) XXX_Unmarshal

func (m *TraceRecord) XXX_Unmarshal(b []byte) error

type TraceRecordPubSubClient

type TraceRecordPubSubClient interface {
	// Subscribe the Trace records generated on this service. The service will periodically (e.g. per minute)
	// publishes Trace records to clients via gRPC stream.
	Subscribe(ctx context.Context, in *TraceRecordRequest, opts ...grpc.CallOption) (TraceRecordPubSub_SubscribeClient, error)
}

TraceRecordPubSubClient is the client API for TraceRecordPubSub service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTraceRecordPubSubClient

func NewTraceRecordPubSubClient(cc *grpc.ClientConn) TraceRecordPubSubClient

type TraceRecordPubSubServer

type TraceRecordPubSubServer interface {
	// Subscribe the Trace records generated on this service. The service will periodically (e.g. per minute)
	// publishes Trace records to clients via gRPC stream.
	Subscribe(*TraceRecordRequest, TraceRecordPubSub_SubscribeServer) error
}

TraceRecordPubSubServer is the server API for TraceRecordPubSub service.

type TraceRecordPubSub_SubscribeClient

type TraceRecordPubSub_SubscribeClient interface {
	Recv() (*TraceRecord, error)
	grpc.ClientStream
}

type TraceRecordPubSub_SubscribeServer

type TraceRecordPubSub_SubscribeServer interface {
	Send(*TraceRecord) error
	grpc.ServerStream
}

type TraceRecordRequest

type TraceRecordRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TraceRecordRequest) Descriptor

func (*TraceRecordRequest) Descriptor() ([]byte, []int)

func (*TraceRecordRequest) Marshal

func (m *TraceRecordRequest) Marshal() (dAtA []byte, err error)

func (*TraceRecordRequest) MarshalTo

func (m *TraceRecordRequest) MarshalTo(dAtA []byte) (int, error)

func (*TraceRecordRequest) MarshalToSizedBuffer

func (m *TraceRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceRecordRequest) ProtoMessage

func (*TraceRecordRequest) ProtoMessage()

func (*TraceRecordRequest) Reset

func (m *TraceRecordRequest) Reset()

func (*TraceRecordRequest) Size

func (m *TraceRecordRequest) Size() (n int)

func (*TraceRecordRequest) String

func (m *TraceRecordRequest) String() string

func (*TraceRecordRequest) Unmarshal

func (m *TraceRecordRequest) Unmarshal(dAtA []byte) error

func (*TraceRecordRequest) XXX_DiscardUnknown

func (m *TraceRecordRequest) XXX_DiscardUnknown()

func (*TraceRecordRequest) XXX_Marshal

func (m *TraceRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceRecordRequest) XXX_Merge

func (m *TraceRecordRequest) XXX_Merge(src proto.Message)

func (*TraceRecordRequest) XXX_Size

func (m *TraceRecordRequest) XXX_Size() int

func (*TraceRecordRequest) XXX_Unmarshal

func (m *TraceRecordRequest) XXX_Unmarshal(b []byte) error

type TraceRecord_NotifyCollect

type TraceRecord_NotifyCollect struct {
	NotifyCollect *NotifyCollect `protobuf:"bytes,2,opt,name=notify_collect,json=notifyCollect,proto3,oneof" json:"notify_collect,omitempty"`
}

func (*TraceRecord_NotifyCollect) MarshalTo

func (m *TraceRecord_NotifyCollect) MarshalTo(dAtA []byte) (int, error)

func (*TraceRecord_NotifyCollect) MarshalToSizedBuffer

func (m *TraceRecord_NotifyCollect) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceRecord_NotifyCollect) Size

func (m *TraceRecord_NotifyCollect) Size() (n int)

type TraceRecord_Report

type TraceRecord_Report struct {
	Report *Report `protobuf:"bytes,1,opt,name=report,proto3,oneof" json:"report,omitempty"`
}

func (*TraceRecord_Report) MarshalTo

func (m *TraceRecord_Report) MarshalTo(dAtA []byte) (int, error)

func (*TraceRecord_Report) MarshalToSizedBuffer

func (m *TraceRecord_Report) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceRecord_Report) Size

func (m *TraceRecord_Report) Size() (n int)

type UnimplementedTraceRecordPubSubServer

type UnimplementedTraceRecordPubSubServer struct {
}

UnimplementedTraceRecordPubSubServer can be embedded to have forward compatible implementations.

func (*UnimplementedTraceRecordPubSubServer) Subscribe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL