tracing

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: Apache-2.0 Imports: 16 Imported by: 11

Documentation

Index

Constants

View Source
const JaegerServiceName = "pachd"

JaegerServiceName is the name pachd (and the pachyderm client) uses to describe itself when it reports traces to Jaeger

Variables

View Source
var (
	ErrInvalidLengthPipelinetrace = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPipelinetrace   = fmt.Errorf("proto: integer overflow")
)

Functions

func AddSpanToAnyExisting

func AddSpanToAnyExisting(ctx context.Context, operation string, kvs ...interface{}) (opentracing.Span, context.Context)

AddSpanToAnyExisting checks 'ctx' for Jaeger tracing information, and if tracing metadata is present, it generates a new span for 'operation', marks it as a child of the existing span, and returns it.

func CloseAndReportTraces

func CloseAndReportTraces()

CloseAndReportTraces tries to close the global tracer, which, in the case of the Jaeger tracer, causes it to send any unreported traces to the collector

func FinishAnySpan

func FinishAnySpan(span opentracing.Span)

FinishAnySpan calls span.Finish() if span is not nil. Pairs with AddSpanToAnyExisting

func InstallJaegerTracerFromEnv

func InstallJaegerTracerFromEnv()

InstallJaegerTracerFromEnv installs a Jaeger client as the opentracing global tracer, relying on environment variables to configure the client

func IsActive

func IsActive() bool

IsActive returns true if a connection to Jaeger has been established and a global tracer has been installed

func StreamClientInterceptor

func StreamClientInterceptor() grpc.StreamClientInterceptor

StreamClientInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs

func TagAnySpan added in v1.8.8

func TagAnySpan(spanBox interface{}, kvs ...interface{}) opentracing.Span

TagAnySpan tags any span associated with 'spanBox' (which must be either a span itself or a context.Context) with 'kvs'

func UnaryClientInterceptor

func UnaryClientInterceptor() grpc.UnaryClientInterceptor

UnaryClientInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs

Types

type TraceInfo

type TraceInfo struct {
	// value contains the info identifying a trace in Jaeger (a
	// (trace ID, span ID, sampled) tuple, basically)
	Value map[string]string `` /* 151-byte string literal not displayed */
	// tags are identifiers with which this trace be retrieves from etcd. In the
	// case of a CreatePipeline trace, this would have one value: the name of the
	// pipeline. In the case of a FinishCommit trace, we'd have one tag for each
	// output commit that we want to track.
	//
	// This field has to be at the top-level of TraceInfo so we can index off of
	// it in the 'traces' collection, but because it's ambiguous and may not be
	// populated when the TraceInfo is collected, we store the information needed
	// to populate it in the various <operation>_opts fields below.
	Tags                  []string                           `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
	CreatePipelineOpts    *TraceInfo_CreatePipelineTraceOpts `protobuf:"bytes,3,opt,name=create_pipeline_opts,json=createPipelineOpts,proto3" json:"create_pipeline_opts,omitempty"`
	FinishCommitTraceOpts *TraceInfo_FinishCommitTraceOpts   `` /* 128-byte string literal not displayed */
	XXX_NoUnkeyedLiteral  struct{}                           `json:"-"`
	XXX_unrecognized      []byte                             `json:"-"`
	XXX_sizecache         int32                              `json:"-"`
}

TraceInfo contains information identifying a Jaeger trace. It's used to propagate "Super Traces"—traces that live longer than any single RPC. Currently, there are two kinds of Super Traces:

  • CreatePipeline traces, which start with 'pachctl create-pipeline' and end when the created pipeline is in the "running" state (or when any errors are encountered)
  • FinishCommit traces, which start with 'pachctl finish-commit' (or the end of a one-off 'pachctl put-file' command) and ends when the target pipeline (or last pipeline to process the newly-created commit) finishes the output commit generated by this input commit

func (*TraceInfo) Descriptor

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

func (*TraceInfo) GetCreatePipelineOpts

func (m *TraceInfo) GetCreatePipelineOpts() *TraceInfo_CreatePipelineTraceOpts

func (*TraceInfo) GetFinishCommitTraceOpts

func (m *TraceInfo) GetFinishCommitTraceOpts() *TraceInfo_FinishCommitTraceOpts

func (*TraceInfo) GetTags

func (m *TraceInfo) GetTags() []string

func (*TraceInfo) GetValue

func (m *TraceInfo) GetValue() map[string]string

func (*TraceInfo) Marshal

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

func (*TraceInfo) MarshalTo

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

func (*TraceInfo) ProtoMessage

func (*TraceInfo) ProtoMessage()

func (*TraceInfo) Reset

func (m *TraceInfo) Reset()

func (*TraceInfo) Size

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

func (*TraceInfo) String

func (m *TraceInfo) String() string

func (*TraceInfo) Unmarshal

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

func (*TraceInfo) XXX_DiscardUnknown

func (m *TraceInfo) XXX_DiscardUnknown()

func (*TraceInfo) XXX_Marshal

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

func (*TraceInfo) XXX_Merge

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

func (*TraceInfo) XXX_Size

func (m *TraceInfo) XXX_Size() int

func (*TraceInfo) XXX_Unmarshal

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

type TraceInfo_CreatePipelineTraceOpts

type TraceInfo_CreatePipelineTraceOpts struct {
	// pipeline is the name of the pipeline that the 'pachctl create-pipeline'
	// request responsible for this trace created
	Pipeline             string   `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CreatePipelineTraceOpts contains the options needed to crate a CreatePipeline Super Trace.

func (*TraceInfo_CreatePipelineTraceOpts) Descriptor

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

func (*TraceInfo_CreatePipelineTraceOpts) GetPipeline

func (m *TraceInfo_CreatePipelineTraceOpts) GetPipeline() string

func (*TraceInfo_CreatePipelineTraceOpts) Marshal

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

func (*TraceInfo_CreatePipelineTraceOpts) MarshalTo

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

func (*TraceInfo_CreatePipelineTraceOpts) ProtoMessage

func (*TraceInfo_CreatePipelineTraceOpts) ProtoMessage()

func (*TraceInfo_CreatePipelineTraceOpts) Reset

func (*TraceInfo_CreatePipelineTraceOpts) Size

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

func (*TraceInfo_CreatePipelineTraceOpts) String

func (*TraceInfo_CreatePipelineTraceOpts) Unmarshal

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

func (*TraceInfo_CreatePipelineTraceOpts) XXX_DiscardUnknown

func (m *TraceInfo_CreatePipelineTraceOpts) XXX_DiscardUnknown()

func (*TraceInfo_CreatePipelineTraceOpts) XXX_Marshal

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

func (*TraceInfo_CreatePipelineTraceOpts) XXX_Merge

func (*TraceInfo_CreatePipelineTraceOpts) XXX_Size

func (m *TraceInfo_CreatePipelineTraceOpts) XXX_Size() int

func (*TraceInfo_CreatePipelineTraceOpts) XXX_Unmarshal

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

type TraceInfo_FinishCommitTraceOpts

type TraceInfo_FinishCommitTraceOpts struct {
	// branch specifies the final output branch that the 'pachctl finish-commit'
	// trace should last until (if empty, pachctl will use the downstream branch
	// with the longest provenance)
	Branch               *pfs.Branch `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

FinishCommitTraceOpts contains the options needed to crate a FinishCommit Super Trace.

func (*TraceInfo_FinishCommitTraceOpts) Descriptor

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

func (*TraceInfo_FinishCommitTraceOpts) GetBranch

func (m *TraceInfo_FinishCommitTraceOpts) GetBranch() *pfs.Branch

func (*TraceInfo_FinishCommitTraceOpts) Marshal

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

func (*TraceInfo_FinishCommitTraceOpts) MarshalTo

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

func (*TraceInfo_FinishCommitTraceOpts) ProtoMessage

func (*TraceInfo_FinishCommitTraceOpts) ProtoMessage()

func (*TraceInfo_FinishCommitTraceOpts) Reset

func (*TraceInfo_FinishCommitTraceOpts) Size

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

func (*TraceInfo_FinishCommitTraceOpts) String

func (*TraceInfo_FinishCommitTraceOpts) Unmarshal

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

func (*TraceInfo_FinishCommitTraceOpts) XXX_DiscardUnknown

func (m *TraceInfo_FinishCommitTraceOpts) XXX_DiscardUnknown()

func (*TraceInfo_FinishCommitTraceOpts) XXX_Marshal

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

func (*TraceInfo_FinishCommitTraceOpts) XXX_Merge

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

func (*TraceInfo_FinishCommitTraceOpts) XXX_Size

func (m *TraceInfo_FinishCommitTraceOpts) XXX_Size() int

func (*TraceInfo_FinishCommitTraceOpts) XXX_Unmarshal

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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