xprotocol

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const (
	TRACE_ID = iota
	SPAN_ID
	PARENT_SPAN_ID
	SERVICE_NAME
	METHOD_NAME
	PROTOCOL
	RESULT_STATUS
	REQUEST_SIZE
	RESPONSE_SIZE
	UPSTREAM_HOST_ADDRESS
	DOWNSTEAM_HOST_ADDRESS
	APP_NAME        //caller
	TARGET_APP_NAME //remote app
	SPAN_TYPE
	BAGGAGE_DATA
	REQUEST_URL
	TARGET_CELL
	TARGET_IDC
	TARGET_CITY
	ROUTE_RECORD
	CALLER_CELL

	TRACE_END = 70
)
View Source
const (
	MOSN_PROCESS_TIME = 60 + iota
	MOSN_TLS_STATE
	TLSCipherSuite
	MOSN_PROCESS_FAIL
)

Variables

View Source
var PrintLog = true

Functions

func NewTracer

func NewTracer(config map[string]interface{}) (api.Tracer, error)

func RegisterSubProtocol

func RegisterSubProtocol(name types.ProtocolName, delegate SubProtocolDelegate)

Types

type SofaRPCSpan

type SofaRPCSpan struct {
	// contains filtered or unexported fields
}

func NewSpan

func NewSpan(ctx context.Context, startTime time.Time) *SofaRPCSpan

func (*SofaRPCSpan) EndTime

func (s *SofaRPCSpan) EndTime() time.Time

func (*SofaRPCSpan) FinishSpan

func (s *SofaRPCSpan) FinishSpan()

func (*SofaRPCSpan) InjectContext

func (s *SofaRPCSpan) InjectContext(requestHeaders api.HeaderMap, requestInfo api.RequestInfo)

func (*SofaRPCSpan) ParentSpanId

func (s *SofaRPCSpan) ParentSpanId() string

func (*SofaRPCSpan) SetOperation

func (s *SofaRPCSpan) SetOperation(operation string)

func (*SofaRPCSpan) SetRequestInfo

func (s *SofaRPCSpan) SetRequestInfo(reqinfo api.RequestInfo)

func (*SofaRPCSpan) SetStartTime

func (s *SofaRPCSpan) SetStartTime(startTime time.Time)

func (*SofaRPCSpan) SetTag

func (s *SofaRPCSpan) SetTag(key uint64, value string)

func (*SofaRPCSpan) SpanId

func (s *SofaRPCSpan) SpanId() string

func (*SofaRPCSpan) SpawnChild

func (s *SofaRPCSpan) SpawnChild(operationName string, startTime time.Time) api.Span

func (*SofaRPCSpan) StartTime

func (s *SofaRPCSpan) StartTime() time.Time

func (*SofaRPCSpan) String

func (s *SofaRPCSpan) String() string

func (*SofaRPCSpan) Tag

func (s *SofaRPCSpan) Tag(key uint64) string

func (*SofaRPCSpan) TraceId

func (s *SofaRPCSpan) TraceId() string

type SubProtocolDelegate

type SubProtocolDelegate func(ctx context.Context, frame api.XFrame, span api.Span)

type Tracer

type Tracer struct{}

func (*Tracer) Start

func (tracer *Tracer) Start(ctx context.Context, frame interface{}, startTime time.Time) api.Span

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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