trace

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close the tracer.

func FinishHTTPSpan

func FinishHTTPSpan(sp opentracing.Span, code int)

FinishHTTPSpan finishes a HTTP span.

func FinishSpan added in v0.3.1

func FinishSpan(sp opentracing.Span, hasError bool)

FinishSpan finished a kafka consumer span.

func Setup

func Setup(name, agentAddress, samplerType string, samplerParam float64) error

Setup tracing by providing a local agent address.

func StartChildSpan added in v0.3.1

func StartChildSpan(ctx context.Context, opName, cmp string, tags ...opentracing.Tag) (opentracing.Span, context.Context)

StartChildSpan starts a new child span with specified tags.

func StartConsumerSpan

func StartConsumerSpan(ctx context.Context, name string, cmp Component, hdr map[string]string) (opentracing.Span, context.Context)

StartConsumerSpan start a new kafka consumer span.

func StartHTTPSpan

func StartHTTPSpan(path string, r *http.Request) (opentracing.Span, *http.Request)

StartHTTPSpan starts a new HTTP span.

Types

type Component

type Component string

Component enum definition.

const (
	// KafkaConsumerComponent definition.
	KafkaConsumerComponent Component = "kafka-consumer"
	// AMQPConsumerComponent definition.
	AMQPConsumerComponent Component = "amqp-consumer"
	// HTTPComponent definition.
	HTTPComponent Component = "http"
)

Jump to

Keyboard shortcuts

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