trace

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 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 FinishConsumerSpan

func FinishConsumerSpan(sp opentracing.Span, hasError bool)

FinishConsumerSpan finished a kafka consumer span.

func FinishHTTPSpan

func FinishHTTPSpan(sp opentracing.Span, code int)

FinishHTTPSpan finishes a HTTP span.

func Initialize

func Initialize()

Initialize the tracer if it not already initialized.

func Setup

func Setup(name, agentAddress string) error

Setup tracing by providing a local agent address.

func StartConsumerSpan

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

StartConsumerSpan start a new kafka consumer span.

func StartHTTPSpan

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

StartHTTPSpan starts a new HTTP span.

func Tracer

func Tracer() opentracing.Tracer

Tracer returns the setup tracer.

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