extended

package
v2.7.0-nightly.20230526 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TraceDurationEnvVar determines whether a traced 'CreatePipeline' RPC is
	// propagated to the PPS master, and whether worker creation and such is
	// traced in addition to the original RPC. This value should be set to a
	// go duration to create an extended trace
	TraceDurationEnvVar = "PACH_TRACE_DURATION"
)

Variables

View Source
var (
	ErrInvalidLengthExtendedTrace        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExtendedTrace          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExtendedTrace = fmt.Errorf("proto: unexpected end of group")
)

Functions

func AddSpanToAnyPipelineTrace

func AddSpanToAnyPipelineTrace(ctx context.Context, c *etcd.Client,
	pipeline *pps.Pipeline, operation string, kvs ...interface{}) (opentracing.Span, context.Context)

AddSpanToAnyPipelineTrace finds any extended traces associated with 'pipeline', and if any such trace exists, it creates a new span associated with that trace and returns it

func EmbedAnyDuration

func EmbedAnyDuration(ctx context.Context) (newCtx context.Context, err error)

EmbedAnyDuration augments 'ctx' (and returns a new ctx) based on whether the environment variable in 'ExtendedTraceEnvVar' is set. Returns a context that may have the new span attached, and 'true' if an an extended trace was created, or 'false' otherwise. Currently only called by the CreatePipeline cobra command

func PersistAny

func PersistAny(ctx context.Context, c *etcd.Client, pipeline *pps.Pipeline)

PersistAny copies any extended traces from the incoming RPC context in 'ctx' into etcd. Currently, this is only called by CreatePipeline, when it stores a trace for future updates by the PPS master and workers. This function is best-effort, and therefore doesn't currently return an error. Any errors are logged, and then the given context is returned.

func TracesCol

func TracesCol(c *etcd.Client) col.EtcdCollection

TracesCol returns the etcd collection of extended traces

Types

type TraceProto

type TraceProto struct {
	// serialized_trace contains the info identifying a trace in Jaeger (a
	// (trace ID, span ID, sampled) tuple, basically)
	SerializedTrace map[string]string `` /* 194-byte string literal not displayed */
	Project         string            `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`
	// pipeline specifies the target pipeline of this trace; this would be set for
	// a trace created by 'pachctl create-pipeline' or 'pachctl update-pipeline'
	// and would include the kubernetes RPCs involved in creating a pipeline
	Pipeline             string   `protobuf:"bytes,2,opt,name=pipeline,proto3" json:"pipeline,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TraceProto contains information identifying a Jaeger trace. It's used to propagate traces that follow the lifetime of a long operation (e.g. creating a pipeline or running a job), and which live longer than any single RPC.

func (*TraceProto) Descriptor

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

func (*TraceProto) GetPipeline

func (m *TraceProto) GetPipeline() string

func (*TraceProto) GetProject

func (m *TraceProto) GetProject() string

func (*TraceProto) GetSerializedTrace

func (m *TraceProto) GetSerializedTrace() map[string]string

func (*TraceProto) Marshal

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

func (*TraceProto) MarshalLogObject

func (x *TraceProto) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*TraceProto) MarshalTo

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

func (*TraceProto) MarshalToSizedBuffer

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

func (*TraceProto) ProtoMessage

func (*TraceProto) ProtoMessage()

func (*TraceProto) Reset

func (m *TraceProto) Reset()

func (*TraceProto) Size

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

func (*TraceProto) String

func (m *TraceProto) String() string

func (*TraceProto) Unmarshal

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

func (*TraceProto) XXX_DiscardUnknown

func (m *TraceProto) XXX_DiscardUnknown()

func (*TraceProto) XXX_Marshal

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

func (*TraceProto) XXX_Merge

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

func (*TraceProto) XXX_Size

func (m *TraceProto) XXX_Size() int

func (*TraceProto) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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