Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package. It is generated from these files: pb/agent.proto pb/span.proto It has these top-level messages: TracingReqResp Trace Span TraceID SpanRef KeyValue Log Process DependencyLink
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterTracingAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTracingAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTracingAgentServiceServer(s *grpc.Server, srv TracingAgentServiceServer)
- type DependencyLink
- func (*DependencyLink) Descriptor() ([]byte, []int)
- func (m *DependencyLink) GetCallCount() uint64
- func (m *DependencyLink) GetChild() string
- func (m *DependencyLink) GetParent() string
- func (m *DependencyLink) Marshal() (dAtA []byte, err error)
- func (m *DependencyLink) MarshalTo(dAtA []byte) (int, error)
- func (*DependencyLink) ProtoMessage()
- func (m *DependencyLink) Reset()
- func (m *DependencyLink) Size() (n int)
- func (m *DependencyLink) String() string
- func (m *DependencyLink) Unmarshal(dAtA []byte) error
- type KeyValue
- func (*KeyValue) Descriptor() ([]byte, []int)
- func (m *KeyValue) GetKey() string
- func (m *KeyValue) GetVBlob() []byte
- func (m *KeyValue) GetVNum() int64
- func (m *KeyValue) GetVStr() string
- func (m *KeyValue) GetVType() ValueType
- func (m *KeyValue) Marshal() (dAtA []byte, err error)
- func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)
- func (*KeyValue) ProtoMessage()
- func (m *KeyValue) Reset()
- func (m *KeyValue) Size() (n int)
- func (m *KeyValue) String() string
- func (m *KeyValue) Unmarshal(dAtA []byte) error
- type Log
- func (*Log) Descriptor() ([]byte, []int)
- func (m *Log) GetFields() []*KeyValue
- func (m *Log) GetTimestamp() int64
- func (m *Log) Marshal() (dAtA []byte, err error)
- func (m *Log) MarshalTo(dAtA []byte) (int, error)
- func (*Log) ProtoMessage()
- func (m *Log) Reset()
- func (m *Log) Size() (n int)
- func (m *Log) String() string
- func (m *Log) Unmarshal(dAtA []byte) error
- type Process
- func (*Process) Descriptor() ([]byte, []int)
- func (m *Process) GetServiceName() string
- func (m *Process) GetTags() []*KeyValue
- func (m *Process) Marshal() (dAtA []byte, err error)
- func (m *Process) MarshalTo(dAtA []byte) (int, error)
- func (*Process) ProtoMessage()
- func (m *Process) Reset()
- func (m *Process) Size() (n int)
- func (m *Process) String() string
- func (m *Process) Unmarshal(dAtA []byte) error
- type Span
- func (*Span) Descriptor() ([]byte, []int)
- func (m *Span) GetDuration() int64
- func (m *Span) GetFlags() uint32
- func (m *Span) GetLogs() []*Log
- func (m *Span) GetParentSpanId() uint64
- func (m *Span) GetProcess() *Process
- func (m *Span) GetReferences() []*SpanRef
- func (m *Span) GetSpanId() uint64
- func (m *Span) GetStartTime() int64
- func (m *Span) GetTags() []*KeyValue
- func (m *Span) GetTraceId() *TraceID
- func (m *Span) GetWarnings() []string
- func (m *Span) Marshal() (dAtA []byte, err error)
- func (m *Span) MarshalTo(dAtA []byte) (int, error)
- func (*Span) ProtoMessage()
- func (m *Span) Reset()
- func (m *Span) Size() (n int)
- func (m *Span) String() string
- func (m *Span) Unmarshal(dAtA []byte) error
- type SpanRef
- func (*SpanRef) Descriptor() ([]byte, []int)
- func (m *SpanRef) GetRefType() SpanRefType
- func (m *SpanRef) GetSpanId() uint64
- func (m *SpanRef) GetTraceId() *TraceID
- func (m *SpanRef) Marshal() (dAtA []byte, err error)
- func (m *SpanRef) MarshalTo(dAtA []byte) (int, error)
- func (*SpanRef) ProtoMessage()
- func (m *SpanRef) Reset()
- func (m *SpanRef) Size() (n int)
- func (m *SpanRef) String() string
- func (m *SpanRef) Unmarshal(dAtA []byte) error
- type SpanRefType
- type Trace
- func (*Trace) Descriptor() ([]byte, []int)
- func (m *Trace) GetSpans() []*Span
- func (m *Trace) GetWarnings() []string
- func (m *Trace) Marshal() (dAtA []byte, err error)
- func (m *Trace) MarshalTo(dAtA []byte) (int, error)
- func (*Trace) ProtoMessage()
- func (m *Trace) Reset()
- func (m *Trace) Size() (n int)
- func (m *Trace) String() string
- func (m *Trace) Unmarshal(dAtA []byte) error
- type TraceID
- func (*TraceID) Descriptor() ([]byte, []int)
- func (m *TraceID) GetHigh() uint64
- func (m *TraceID) GetLow() uint64
- func (m *TraceID) Marshal() (dAtA []byte, err error)
- func (m *TraceID) MarshalTo(dAtA []byte) (int, error)
- func (*TraceID) ProtoMessage()
- func (m *TraceID) Reset()
- func (m *TraceID) Size() (n int)
- func (m *TraceID) String() string
- func (m *TraceID) Unmarshal(dAtA []byte) error
- type TracingAgentServiceClient
- type TracingAgentServiceServer
- type TracingReqResp
- func (*TracingReqResp) Descriptor() ([]byte, []int)
- func (m *TracingReqResp) GetSpan() *Span
- func (m *TracingReqResp) GetStateCode() int32
- func (m *TracingReqResp) GetStateMessage() string
- func (m *TracingReqResp) Marshal() (dAtA []byte, err error)
- func (m *TracingReqResp) MarshalTo(dAtA []byte) (int, error)
- func (*TracingReqResp) ProtoMessage()
- func (m *TracingReqResp) Reset()
- func (m *TracingReqResp) Size() (n int)
- func (m *TracingReqResp) String() string
- func (m *TracingReqResp) Unmarshal(dAtA []byte) error
- type ValueType
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthSpan = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSpan = fmt.Errorf("proto: integer overflow") )
var SpanRefType_name = map[int32]string{
0: "ChildOf",
1: "FollowsFrom",
}
var SpanRefType_value = map[string]int32{
"ChildOf": 0,
"FollowsFrom": 1,
}
var ValueType_name = map[int32]string{
0: "StringType",
1: "BoolType",
2: "Int64Type",
3: "Float64Type",
4: "BinaryType",
}
var ValueType_value = map[string]int32{
"StringType": 0,
"BoolType": 1,
"Int64Type": 2,
"Float64Type": 3,
"BinaryType": 4,
}
Functions ¶
func RegisterTracingAgentServiceHandler ¶
func RegisterTracingAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTracingAgentServiceHandler registers the http handlers for service TracingAgentService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTracingAgentServiceHandlerFromEndpoint ¶
func RegisterTracingAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTracingAgentServiceHandlerFromEndpoint is same as RegisterTracingAgentServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTracingAgentServiceServer ¶
func RegisterTracingAgentServiceServer(s *grpc.Server, srv TracingAgentServiceServer)
Types ¶
type DependencyLink ¶
type DependencyLink struct { Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` Child string `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount,proto3" json:"call_count,omitempty"` }
DependencyLink shows dependencies between services
func (*DependencyLink) Descriptor ¶
func (*DependencyLink) Descriptor() ([]byte, []int)
func (*DependencyLink) GetCallCount ¶
func (m *DependencyLink) GetCallCount() uint64
func (*DependencyLink) GetChild ¶
func (m *DependencyLink) GetChild() string
func (*DependencyLink) GetParent ¶
func (m *DependencyLink) GetParent() string
func (*DependencyLink) Marshal ¶
func (m *DependencyLink) Marshal() (dAtA []byte, err error)
func (*DependencyLink) ProtoMessage ¶
func (*DependencyLink) ProtoMessage()
func (*DependencyLink) Reset ¶
func (m *DependencyLink) Reset()
func (*DependencyLink) Size ¶
func (m *DependencyLink) Size() (n int)
func (*DependencyLink) String ¶
func (m *DependencyLink) String() string
func (*DependencyLink) Unmarshal ¶
func (m *DependencyLink) Unmarshal(dAtA []byte) error
type KeyValue ¶
type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` VType ValueType `protobuf:"varint,2,opt,name=v_type,json=vType,proto3,enum=pb.ValueType" json:"v_type,omitempty"` VStr string `protobuf:"bytes,3,opt,name=v_str,json=vStr,proto3" json:"v_str,omitempty"` VNum int64 `protobuf:"varint,4,opt,name=v_num,json=vNum,proto3" json:"v_num,omitempty"` VBlob []byte `protobuf:"bytes,5,opt,name=v_blob,json=vBlob,proto3" json:"v_blob,omitempty"` }
KeyValue describes a tag or a log field that consists of a key and a typed value. Before accessing a value, the caller must check the type. Boolean and numeric values should be accessed via accessor methods Bool(), Int64(), and Float64().
This struct is designed to minimize heap allocations.
func (*KeyValue) Descriptor ¶
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
type Log ¶
type Log struct { // google.protobuf.Timestamp timestamp = 1; Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Fields []*KeyValue `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"` }
Log describes a micro-log entry that consists of a timestamp and one or more key-value fields
func (*Log) Descriptor ¶
func (*Log) GetTimestamp ¶
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
type Process ¶
type Process struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Tags []*KeyValue `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` }
Process describes an instance of an application or service that emits tracing data.
func (*Process) Descriptor ¶
func (*Process) GetServiceName ¶
func (*Process) ProtoMessage ¶
func (*Process) ProtoMessage()
type Span ¶
type Span struct { TraceId *TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` SpanId uint64 `protobuf:"varint,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` ParentSpanId uint64 `protobuf:"varint,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"` References []*SpanRef `protobuf:"bytes,4,rep,name=references" json:"references,omitempty"` Flags uint32 `protobuf:"varint,5,opt,name=flags,proto3" json:"flags,omitempty"` // google.protobuf.Timestamp start_time = 6; StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` Duration int64 `protobuf:"varint,7,opt,name=duration,proto3" json:"duration,omitempty"` Tags []*KeyValue `protobuf:"bytes,8,rep,name=tags" json:"tags,omitempty"` Logs []*Log `protobuf:"bytes,9,rep,name=logs" json:"logs,omitempty"` Process *Process `protobuf:"bytes,10,opt,name=process" json:"process,omitempty"` Warnings []string `protobuf:"bytes,11,rep,name=warnings" json:"warnings,omitempty"` }
Span represents a unit of work in an application, such as an RPC, a database call, etc.
func (*Span) Descriptor ¶
func (*Span) GetDuration ¶
func (*Span) GetParentSpanId ¶
func (*Span) GetProcess ¶
func (*Span) GetReferences ¶
func (*Span) GetStartTime ¶
func (*Span) GetTraceId ¶
func (*Span) GetWarnings ¶
func (*Span) ProtoMessage ¶
func (*Span) ProtoMessage()
type SpanRef ¶
type SpanRef struct { RefType SpanRefType `protobuf:"varint,1,opt,name=ref_type,json=refType,proto3,enum=pb.SpanRefType" json:"ref_type,omitempty"` TraceId *TraceID `protobuf:"bytes,2,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` SpanId uint64 `protobuf:"varint,3,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` }
SpanRef describes a reference from one span to another
func (*SpanRef) Descriptor ¶
func (*SpanRef) GetRefType ¶
func (m *SpanRef) GetRefType() SpanRefType
func (*SpanRef) GetTraceId ¶
func (*SpanRef) ProtoMessage ¶
func (*SpanRef) ProtoMessage()
type SpanRefType ¶
type SpanRefType int32
const ( SpanRefType_ChildOf SpanRefType = 0 SpanRefType_FollowsFrom SpanRefType = 1 )
func (SpanRefType) EnumDescriptor ¶
func (SpanRefType) EnumDescriptor() ([]byte, []int)
func (SpanRefType) String ¶
func (x SpanRefType) String() string
type Trace ¶
type Trace struct { Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` Warnings []string `protobuf:"bytes,2,rep,name=warnings" json:"warnings,omitempty"` }
Trace is a directed acyclic graph of Spans
func (*Trace) Descriptor ¶
func (*Trace) GetWarnings ¶
func (*Trace) ProtoMessage ¶
func (*Trace) ProtoMessage()
type TraceID ¶
type TraceID struct { Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` }
TraceID is a random 128bit identifier for a trace
func (*TraceID) Descriptor ¶
func (*TraceID) ProtoMessage ¶
func (*TraceID) ProtoMessage()
type TracingAgentServiceClient ¶
type TracingAgentServiceClient interface {
Sample(ctx context.Context, in *TracingReqResp, opts ...grpc.CallOption) (*TracingReqResp, error)
}
func NewTracingAgentServiceClient ¶
func NewTracingAgentServiceClient(cc *grpc.ClientConn) TracingAgentServiceClient
type TracingAgentServiceServer ¶
type TracingAgentServiceServer interface {
Sample(context.Context, *TracingReqResp) (*TracingReqResp, error)
}
type TracingReqResp ¶
type TracingReqResp struct { Span *Span `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"` StateCode int32 `protobuf:"varint,2,opt,name=state_code,json=stateCode,proto3" json:"state_code,omitempty"` StateMessage string `protobuf:"bytes,3,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"` }
func (*TracingReqResp) Descriptor ¶
func (*TracingReqResp) Descriptor() ([]byte, []int)
func (*TracingReqResp) GetSpan ¶
func (m *TracingReqResp) GetSpan() *Span
func (*TracingReqResp) GetStateCode ¶
func (m *TracingReqResp) GetStateCode() int32
func (*TracingReqResp) GetStateMessage ¶
func (m *TracingReqResp) GetStateMessage() string
func (*TracingReqResp) Marshal ¶
func (m *TracingReqResp) Marshal() (dAtA []byte, err error)
func (*TracingReqResp) ProtoMessage ¶
func (*TracingReqResp) ProtoMessage()
func (*TracingReqResp) Reset ¶
func (m *TracingReqResp) Reset()
func (*TracingReqResp) Size ¶
func (m *TracingReqResp) Size() (n int)
func (*TracingReqResp) String ¶
func (m *TracingReqResp) String() string
func (*TracingReqResp) Unmarshal ¶
func (m *TracingReqResp) Unmarshal(dAtA []byte) error