trace

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTrace        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTrace          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group")
)
View Source
var SpanType_name = map[int32]string{
	0: "INBOUND",
	1: "OUTBOUND",
}
View Source
var SpanType_value = map[string]int32{
	"INBOUND":  0,
	"OUTBOUND": 1,
}

Functions

func NewTraceEndpoints

func NewTraceEndpoints() []*api.Endpoint

API Endpoints for Trace service

func NewTraceOpenAPI added in v0.8.4

func NewTraceOpenAPI() *registry.OpenAPI

Swagger OpenAPI 3.0 for Trace service

func RegisterTraceHandler

func RegisterTraceHandler(s server.Server, hdlr TraceHandler, opts ...server.HandlerOption) error

func RegisterTraceServer

func RegisterTraceServer(s *grpc.Server, srv TraceServer)

Types

type Node

type Node struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
}

Node describes a single instance of a service.

func (*Node) Descriptor

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

func (*Node) GetAddress

func (m *Node) GetAddress() string

func (*Node) GetId

func (m *Node) GetId() string

func (*Node) Marshal

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

func (*Node) MarshalTo

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

func (*Node) MarshalToSizedBuffer

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

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

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

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

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

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

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

func (*Node) XXX_Merge

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

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

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

type ReadRequest

type ReadRequest struct {
	// If set, only return services matching the filter
	Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// If false, only the current snapshots will be returned.
	// If true, all historical snapshots in memory will be returned.
	Past bool `protobuf:"varint,2,opt,name=past,proto3" json:"past,omitempty"`
	// Number of traces to return
	Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
}

func (*ReadRequest) Descriptor

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

func (*ReadRequest) GetLimit

func (m *ReadRequest) GetLimit() int64

func (*ReadRequest) GetPast

func (m *ReadRequest) GetPast() bool

func (*ReadRequest) GetService

func (m *ReadRequest) GetService() *Service

func (*ReadRequest) Marshal

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

func (*ReadRequest) MarshalTo

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

func (*ReadRequest) MarshalToSizedBuffer

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

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) Size

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

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) Unmarshal

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

func (*ReadRequest) XXX_DiscardUnknown

func (m *ReadRequest) XXX_DiscardUnknown()

func (*ReadRequest) XXX_Marshal

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

func (*ReadRequest) XXX_Merge

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

func (*ReadRequest) XXX_Size

func (m *ReadRequest) XXX_Size() int

func (*ReadRequest) XXX_Unmarshal

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

type ReadResponse

type ReadResponse struct {
	Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"`
}

func (*ReadResponse) Descriptor

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

func (*ReadResponse) GetSpans

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

func (*ReadResponse) Marshal

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

func (*ReadResponse) MarshalTo

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

func (*ReadResponse) MarshalToSizedBuffer

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

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) Reset

func (m *ReadResponse) Reset()

func (*ReadResponse) Size

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

func (*ReadResponse) String

func (m *ReadResponse) String() string

func (*ReadResponse) Unmarshal

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

func (*ReadResponse) XXX_DiscardUnknown

func (m *ReadResponse) XXX_DiscardUnknown()

func (*ReadResponse) XXX_Marshal

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

func (*ReadResponse) XXX_Merge

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

func (*ReadResponse) XXX_Size

func (m *ReadResponse) XXX_Size() int

func (*ReadResponse) XXX_Unmarshal

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

type Service

type Service struct {
	// Service name, e.g. go.vine.service.greeter
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Node    *Node  `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`
}

Service describes a service running in the vine network.

func (*Service) Descriptor

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

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetNode

func (m *Service) GetNode() *Node

func (*Service) GetVersion

func (m *Service) GetVersion() string

func (*Service) Marshal

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

func (*Service) MarshalTo

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

func (*Service) MarshalToSizedBuffer

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

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) Size

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

func (*Service) String

func (m *Service) String() string

func (*Service) Unmarshal

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

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

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

func (*Service) XXX_Merge

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

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

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

type Snapshot

type Snapshot struct {
	// Source of the service where the snapshot was collected from
	Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// Trace spans
	Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
}

Snapshot is a snapshot of Trace.Read from a particular service when called.

func (*Snapshot) Descriptor

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

func (*Snapshot) GetService

func (m *Snapshot) GetService() *Service

func (*Snapshot) GetSpans

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

func (*Snapshot) Marshal

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

func (*Snapshot) MarshalTo

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

func (*Snapshot) MarshalToSizedBuffer

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

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset

func (m *Snapshot) Reset()

func (*Snapshot) Size

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

func (*Snapshot) String

func (m *Snapshot) String() string

func (*Snapshot) Unmarshal

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

func (*Snapshot) XXX_DiscardUnknown

func (m *Snapshot) XXX_DiscardUnknown()

func (*Snapshot) XXX_Marshal

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

func (*Snapshot) XXX_Merge

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

func (*Snapshot) XXX_Size

func (m *Snapshot) XXX_Size() int

func (*Snapshot) XXX_Unmarshal

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

type Span

type Span struct {
	// the trace id
	Trace string `protobuf:"bytes,1,opt,name=trace,proto3" json:"trace,omitempty"`
	// id of the span
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// parent span
	Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
	// name of the resource
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// time of start in nanoseconds
	Started uint64 `protobuf:"varint,5,opt,name=started,proto3" json:"started,omitempty"`
	// duration of the execution in nanoseconds
	Duration uint64 `protobuf:"varint,6,opt,name=duration,proto3" json:"duration,omitempty"`
	// associated metadata
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	Type     SpanType          `protobuf:"varint,8,opt,name=type,proto3,enum=trace.SpanType" json:"type,omitempty"`
}

func (*Span) Descriptor

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

func (*Span) GetDuration

func (m *Span) GetDuration() uint64

func (*Span) GetId

func (m *Span) GetId() string

func (*Span) GetMetadata

func (m *Span) GetMetadata() map[string]string

func (*Span) GetName

func (m *Span) GetName() string

func (*Span) GetParent

func (m *Span) GetParent() string

func (*Span) GetStarted

func (m *Span) GetStarted() uint64

func (*Span) GetTrace

func (m *Span) GetTrace() string

func (*Span) GetType

func (m *Span) GetType() SpanType

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 SpanType

type SpanType int32
const (
	SpanType_INBOUND  SpanType = 0
	SpanType_OUTBOUND SpanType = 1
)

func (SpanType) EnumDescriptor

func (SpanType) EnumDescriptor() ([]byte, []int)

func (SpanType) String

func (x SpanType) String() string

type StreamRequest

type StreamRequest struct {
	// If set, only return services matching the filter
	Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// If set, only return services matching the namespace
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
}

func (*StreamRequest) Descriptor

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

func (*StreamRequest) GetNamespace

func (m *StreamRequest) GetNamespace() string

func (*StreamRequest) GetService

func (m *StreamRequest) GetService() *Service

func (*StreamRequest) Marshal

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

func (*StreamRequest) MarshalTo

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

func (*StreamRequest) MarshalToSizedBuffer

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

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) Reset

func (m *StreamRequest) Reset()

func (*StreamRequest) Size

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

func (*StreamRequest) String

func (m *StreamRequest) String() string

func (*StreamRequest) Unmarshal

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

func (*StreamRequest) XXX_DiscardUnknown

func (m *StreamRequest) XXX_DiscardUnknown()

func (*StreamRequest) XXX_Marshal

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

func (*StreamRequest) XXX_Merge

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

func (*StreamRequest) XXX_Size

func (m *StreamRequest) XXX_Size() int

func (*StreamRequest) XXX_Unmarshal

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

type StreamResponse

type StreamResponse struct {
	Stats []*Snapshot `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"`
}

func (*StreamResponse) Descriptor

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

func (*StreamResponse) GetStats

func (m *StreamResponse) GetStats() []*Snapshot

func (*StreamResponse) Marshal

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

func (*StreamResponse) MarshalTo

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

func (*StreamResponse) MarshalToSizedBuffer

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

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) Reset

func (m *StreamResponse) Reset()

func (*StreamResponse) Size

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

func (*StreamResponse) String

func (m *StreamResponse) String() string

func (*StreamResponse) Unmarshal

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

func (*StreamResponse) XXX_DiscardUnknown

func (m *StreamResponse) XXX_DiscardUnknown()

func (*StreamResponse) XXX_Marshal

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

func (*StreamResponse) XXX_Merge

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

func (*StreamResponse) XXX_Size

func (m *StreamResponse) XXX_Size() int

func (*StreamResponse) XXX_Unmarshal

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

type TraceClient

type TraceClient interface {
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
	Stream(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (Trace_StreamClient, error)
}

TraceClient is the client API for Trace service.

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

func NewTraceClient

func NewTraceClient(cc *grpc.ClientConn) TraceClient

type TraceHandler

Server API for Trace service Stats retrieves a snapshot of the Debug.Stats data for services

type TraceServer

TraceServer is the server API for Trace service.

type TraceService

type TraceService interface {
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
	Stream(ctx context.Context, in *StreamRequest, opts ...client.CallOption) (Trace_StreamService, error)
}

Client API for Trace service Stats retrieves a snapshot of the Debug.Stats data for services

func NewTraceService

func NewTraceService(name string, c client.Client) TraceService

type Trace_StreamClient

type Trace_StreamClient interface {
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type Trace_StreamServer

type Trace_StreamServer interface {
	Send(*StreamResponse) error
	grpc.ServerStream
}

type Trace_StreamService

type Trace_StreamService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*StreamResponse, error)
}

type Trace_StreamStream

type Trace_StreamStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*StreamResponse) error
}

type UnimplementedTraceServer

type UnimplementedTraceServer struct {
}

UnimplementedTraceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTraceServer) Read

func (*UnimplementedTraceServer) Stream

func (*UnimplementedTraceServer) Write

type WriteRequest

type WriteRequest struct {
	// If set, only return services matching the filter
	Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// snapshot to write
	Stats *Snapshot `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
}

func (*WriteRequest) Descriptor

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

func (*WriteRequest) GetService

func (m *WriteRequest) GetService() *Service

func (*WriteRequest) GetStats

func (m *WriteRequest) GetStats() *Snapshot

func (*WriteRequest) Marshal

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

func (*WriteRequest) MarshalTo

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

func (*WriteRequest) MarshalToSizedBuffer

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

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) Reset

func (m *WriteRequest) Reset()

func (*WriteRequest) Size

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

func (*WriteRequest) String

func (m *WriteRequest) String() string

func (*WriteRequest) Unmarshal

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

func (*WriteRequest) XXX_DiscardUnknown

func (m *WriteRequest) XXX_DiscardUnknown()

func (*WriteRequest) XXX_Marshal

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

func (*WriteRequest) XXX_Merge

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

func (*WriteRequest) XXX_Size

func (m *WriteRequest) XXX_Size() int

func (*WriteRequest) XXX_Unmarshal

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

type WriteResponse

type WriteResponse struct {
}

func (*WriteResponse) Descriptor

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

func (*WriteResponse) Marshal

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

func (*WriteResponse) MarshalTo

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

func (*WriteResponse) MarshalToSizedBuffer

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

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) Reset

func (m *WriteResponse) Reset()

func (*WriteResponse) Size

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

func (*WriteResponse) String

func (m *WriteResponse) String() string

func (*WriteResponse) Unmarshal

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

func (*WriteResponse) XXX_DiscardUnknown

func (m *WriteResponse) XXX_DiscardUnknown()

func (*WriteResponse) XXX_Marshal

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

func (*WriteResponse) XXX_Merge

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

func (*WriteResponse) XXX_Size

func (m *WriteResponse) XXX_Size() int

func (*WriteResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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