trace

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// KafkaConsumerComponent definition.
	KafkaConsumerComponent = "kafka-consumer"
	// KafkaAsyncProducerComponent definition.
	KafkaAsyncProducerComponent = "kafka-async-producer"
	// AMQPConsumerComponent definition.
	AMQPConsumerComponent = "amqp-consumer"
	// AMQPPublisherComponent definition.
	AMQPPublisherComponent = "amqp-publisher"
	// HTTPComponent definition.
	HTTPComponent = "http"
	// HTTPClientComponent definition.
	HTTPClientComponent = "http-client"
)

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 by providing a HTTP status code.

func FinishSpanWithError added in v0.4.0

func FinishSpanWithError(sp opentracing.Span)

FinishSpanWithError finishes a span with a error indicator.

func FinishSpanWithSuccess added in v0.4.0

func FinishSpanWithSuccess(sp opentracing.Span)

FinishSpanWithSuccess finishes a span with a success indicator.

func HTTPOpName added in v0.4.0

func HTTPOpName(method, path string) string

HTTPOpName return a string representation of the HTTP request operation.

func Setup

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

Setup tracing by providing all necessary parameters.

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, cmp string,
	hdr map[string]string,
) (opentracing.Span, context.Context)

StartConsumerSpan starts a new consumer span.

func StartHTTPSpan

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

StartHTTPSpan starts a new HTTP span.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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