tracing

package
v2.14.3-rc.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 28 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 GetWorkload added in v2.9.4

func GetWorkload(c context.Context, name, namespace, workloadKind string) (obj k8sapi.Workload, err error)

GetWorkload returns a workload for the given name, namespace, and workloadKind. The workloadKind is optional. A search is performed in the following order if it is empty:

  1. Deployments
  2. ReplicaSets
  3. StatefulSets

The first match is returned.

func GetWorkloadFromCache added in v2.13.0

func GetWorkloadFromCache(ctx context.Context, workloadCache map[string]k8sapi.Workload, name, namespace, kind string) (k8sapi.Workload, 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)

func RecordWorkloadInfo added in v2.9.4

func RecordWorkloadInfo(span trace.Span, wl k8sapi.Workload)

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