tracing

package
v2.9.0-rc.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MaxTraceSize = 10 * 1024 * 1024 // 10 MB

Variables

This section is empty.

Functions

func EndAndRecord added in v2.7.2

func EndAndRecord(span trace.Span, err error)

func NewWrapperFunc added in v2.7.2

func NewWrapperFunc() transport.WrapperFunc

This code is modified from https://github.com/signalfx/splunk-otel-go/blob/main/instrumentation/k8s.io/client-go/splunkclient-go/transport/transport.go which is licensed under Apache 2.0 NewWrapperFunc returns a Kubernetes WrapperFunc that can be used with a client configuration to trace all communication the client makes.

func RecordInterceptInfo

func RecordInterceptInfo(span trace.Span, info *manager.InterceptInfo)

func RecordInterceptSpec

func RecordInterceptSpec(span trace.Span, spec *manager.InterceptSpec)

Types

type ProtoReader

type ProtoReader[T proto.Message] struct {
	// contains filtered or unexported fields
}

func NewProtoReader

func NewProtoReader[T proto.Message](in io.Reader, allocator func() T) *ProtoReader[T]

func (*ProtoReader[T]) ReadAll

func (p *ProtoReader[T]) ReadAll(ctx context.Context) ([]T, error)

func (*ProtoReader[T]) ReadNext

func (p *ProtoReader[T]) ReadNext(ctx context.Context) (T, error)

type ProtoWriter

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

func NewProtoWriter

func NewProtoWriter(out io.Writer) *ProtoWriter

func (*ProtoWriter) Encode

func (p *ProtoWriter) Encode(m proto.Message) error

func (*ProtoWriter) SetWriter

func (p *ProtoWriter) SetWriter(out io.Writer)

type TraceServer

type TraceServer struct {
	common.UnimplementedTracingServer
	// contains filtered or unexported fields
}

func NewTraceServer

func NewTraceServer(ctx context.Context, componentName string, extraAttributes ...attribute.KeyValue) (*TraceServer, error)

func (*TraceServer) DumpTraces

func (ts *TraceServer) DumpTraces(ctx context.Context, _ *emptypb.Empty) (*common.Trace, error)

func (*TraceServer) ServeGrpc

func (ts *TraceServer) ServeGrpc(ctx context.Context, port uint16) error

func (*TraceServer) Shutdown

func (ts *TraceServer) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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