pachyderm: github.com/pachyderm/pachyderm/src/client/pkg/tracing/extended Index | Files

package extended

import "github.com/pachyderm/pachyderm/src/client/pkg/tracing/extended"

Index

Package Files

extended_trace.go extended_trace.pb.go

Constants

const (

    // TracesCollectionPrefix is the prefix associated with the 'traces'
    // collection in etcd (which maps pipelines and commits to extended traces)
    TracesCollectionPrefix = "commit_traces"

    // ExtendedTraceEnvVar determines how long extended traces are updated until
    // they're deleted from the cluster
    ExtendedTraceEnvVar = "PACH_EXTENDED_TRACE"
)

Variables

var (
    // CommitIDIndex is a secondary index for extended traces by the set of
    // commit IDs watched by the trace
    CommitIDIndex = &col.Index{
        Field: "CommitIDs",
        Multi: true,
    }

    // PipelineIndex is a secondary index for extended traces by the pipelint
    // watched by the trace
    PipelineIndex = &col.Index{
        Field: "Pipeline",
    }

    // TraceGetOpts are the default options for retrieving a trace from
    // 'TracesCol'
    TraceGetOpts = &col.Options{Target: etcd.SortByKey, Order: etcd.SortNone, SelfSort: false}
)
var (
    ErrInvalidLengthExtendedTrace = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowExtendedTrace   = fmt.Errorf("proto: integer overflow")
)

func AddPipelineSpanToAnyTrace Uses

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

AddPipelineSpanToAnyTrace 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 StartAnyExtendedTrace Uses

func StartAnyExtendedTrace(ctx context.Context, operation string, pipeline string) (newCtx context.Context, ok bool)

StartAnyExtendedTrace adds a new trace to 'ctx' (and returns an augmented context) based on whether the environment variable in 'targetRepoEnvVar' is set. Returns a context that may have the new span attached, and 'true' if an an extended trace was created, or 'false' otherwise

func TraceIn2Out Uses

func TraceIn2Out(ctx context.Context) context.Context

TraceIn2Out copies any extended traces from the incoming RPC context in 'ctx' into the outgoing RPC context in 'ctx'. Currently, this is only called by CreatePipeline, when it forwards extended contexts to the PutFile RPC with the new commit info.

func TracesCol Uses

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

TracesCol returns the etcd collection of extended traces

type TraceProto Uses

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 `protobuf:"bytes,1,rep,name=serialized_trace,json=serializedTrace,proto3" json:"serialized_trace,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // 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 GetTraceFromCtx Uses

func GetTraceFromCtx(ctx context.Context) (*TraceProto, error)

GetTraceFromCtx extracts any extended trace embeded in 'ctx's metadata

func (*TraceProto) Descriptor Uses

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

func (*TraceProto) GetPipeline Uses

func (m *TraceProto) GetPipeline() string

func (*TraceProto) GetSerializedTrace Uses

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

func (*TraceProto) Marshal Uses

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

func (*TraceProto) MarshalTo Uses

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

func (*TraceProto) ProtoMessage Uses

func (*TraceProto) ProtoMessage()

func (*TraceProto) Reset Uses

func (m *TraceProto) Reset()

func (*TraceProto) Size Uses

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

func (*TraceProto) String Uses

func (m *TraceProto) String() string

func (*TraceProto) Unmarshal Uses

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

func (*TraceProto) XXX_DiscardUnknown Uses

func (m *TraceProto) XXX_DiscardUnknown()

func (*TraceProto) XXX_Marshal Uses

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

func (*TraceProto) XXX_Merge Uses

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

func (*TraceProto) XXX_Size Uses

func (m *TraceProto) XXX_Size() int

func (*TraceProto) XXX_Unmarshal Uses

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

Package extended imports 16 packages (graph) and is imported by 4 packages. Updated 2019-06-14. Refresh now. Tools for package owners.