Documentation ¶
Index ¶
- Constants
- Variables
- func AddSpanToAnyPipelineTrace(ctx context.Context, c *etcd.Client, pipeline *pps.Pipeline, operation string, ...) (opentracing.Span, context.Context)
- func EmbedAnyDuration(ctx context.Context) (newCtx context.Context, err error)
- func PersistAny(ctx context.Context, c *etcd.Client, pipeline *pps.Pipeline)
- func TracesCol(c *etcd.Client) col.EtcdCollection
- type TraceProto
- func (*TraceProto) Descriptor() ([]byte, []int)deprecated
- func (x *TraceProto) GetPipeline() string
- func (x *TraceProto) GetProject() string
- func (x *TraceProto) GetSerializedTrace() map[string]string
- func (x *TraceProto) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (*TraceProto) ProtoMessage()
- func (x *TraceProto) ProtoReflect() protoreflect.Message
- func (x *TraceProto) Reset()
- func (x *TraceProto) String() string
- func (m *TraceProto) Validate() error
- func (m *TraceProto) ValidateAll() error
- type TraceProtoMultiError
- type TraceProtoValidationError
Constants ¶
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 ¶
var File_internal_tracing_extended_extended_trace_proto protoreflect.FileDescriptor
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 ¶
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 ¶
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.
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"` // contains filtered or unexported fields }
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
deprecated
func (*TraceProto) Descriptor() ([]byte, []int)
Deprecated: Use TraceProto.ProtoReflect.Descriptor instead.
func (*TraceProto) GetPipeline ¶
func (x *TraceProto) GetPipeline() string
func (*TraceProto) GetProject ¶
func (x *TraceProto) GetProject() string
func (*TraceProto) GetSerializedTrace ¶
func (x *TraceProto) GetSerializedTrace() map[string]string
func (*TraceProto) MarshalLogObject ¶
func (x *TraceProto) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*TraceProto) ProtoMessage ¶
func (*TraceProto) ProtoMessage()
func (*TraceProto) ProtoReflect ¶ added in v2.7.0
func (x *TraceProto) ProtoReflect() protoreflect.Message
func (*TraceProto) Reset ¶
func (x *TraceProto) Reset()
func (*TraceProto) String ¶
func (x *TraceProto) String() string
func (*TraceProto) Validate ¶ added in v2.8.0
func (m *TraceProto) Validate() error
Validate checks the field values on TraceProto with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TraceProto) ValidateAll ¶ added in v2.8.0
func (m *TraceProto) ValidateAll() error
ValidateAll checks the field values on TraceProto with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TraceProtoMultiError, or nil if none found.
type TraceProtoMultiError ¶ added in v2.8.0
type TraceProtoMultiError []error
TraceProtoMultiError is an error wrapping multiple validation errors returned by TraceProto.ValidateAll() if the designated constraints aren't met.
func (TraceProtoMultiError) AllErrors ¶ added in v2.8.0
func (m TraceProtoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TraceProtoMultiError) Error ¶ added in v2.8.0
func (m TraceProtoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TraceProtoValidationError ¶ added in v2.8.0
type TraceProtoValidationError struct {
// contains filtered or unexported fields
}
TraceProtoValidationError is the validation error returned by TraceProto.Validate if the designated constraints aren't met.
func (TraceProtoValidationError) Cause ¶ added in v2.8.0
func (e TraceProtoValidationError) Cause() error
Cause function returns cause value.
func (TraceProtoValidationError) Error ¶ added in v2.8.0
func (e TraceProtoValidationError) Error() string
Error satisfies the builtin error interface
func (TraceProtoValidationError) ErrorName ¶ added in v2.8.0
func (e TraceProtoValidationError) ErrorName() string
ErrorName returns error name.
func (TraceProtoValidationError) Field ¶ added in v2.8.0
func (e TraceProtoValidationError) Field() string
Field function returns field value.
func (TraceProtoValidationError) Key ¶ added in v2.8.0
func (e TraceProtoValidationError) Key() bool
Key function returns key value.
func (TraceProtoValidationError) Reason ¶ added in v2.8.0
func (e TraceProtoValidationError) Reason() string
Reason function returns reason value.