trace

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubscriptionName        = "sub-name"
	SubscriptionEnvironment = "sub-env"
)
View Source
const (
	DefaultTraceAPIURL        = ""
	DefaultTraceHostPort      = "0.0.0.0:0"
	DefaultTraceServiceName   = "trace-service"
	DefaultTraceOperationName = "trace-operation"
)

Variables

This section is empty.

Functions

func CreateTraceTagsFromCloudEvent

func CreateTraceTagsFromCloudEvent(cloudEvent *api.CloudEvent) map[string]string

func FinishSpan

func FinishSpan(span *opentracing.Span)

func ReadTraceContext

func ReadTraceContext(traceContext *api.TraceContext) *opentracing.SpanContext

func ReadTraceHeaders

func ReadTraceHeaders(header *http.Header) *opentracing.SpanContext

func SetSpanTags

func SetSpanTags(span *opentracing.Span, tags *map[string]string)

func StartSpan

func StartSpan(spanContext *opentracing.SpanContext, operationName *string, opts ...opentracing.StartSpanOption) *opentracing.Span

func TagSpanAsError

func TagSpanAsError(span *opentracing.Span, errorMessage, errorStack string)

func TagSpanWithHttpStatusCode

func TagSpanWithHttpStatusCode(span *opentracing.Span, statusCode uint16)

func WriteSpan

func WriteSpan(span *opentracing.Span) *api.TraceContext

Types

type OpenTracer

type OpenTracer struct {
	// contains filtered or unexported fields
}

func (*OpenTracer) Options

func (zk *OpenTracer) Options() *Options

func (*OpenTracer) Start

func (zk *OpenTracer) Start()

func (*OpenTracer) Started

func (zk *OpenTracer) Started() bool

func (*OpenTracer) Stop

func (zk *OpenTracer) Stop()

type Options

type Options struct {
	APIURL        string
	HostPort      string
	ServiceName   string
	OperationName string
	Debug         bool
}

type Tracer

type Tracer interface {
	Started() bool
	Options() *Options
	Stop()
}

func StartNewTracer

func StartNewTracer(opts *Options) Tracer

Jump to

Keyboard shortcuts

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