trace

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 12 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"
	// SQSConsumerComponent definition.
	SQSConsumerComponent = "sqs-consumer"
	// SNSPublisherComponent definition.
	SNSPublisherComponent = "sns-publisher"
)

Variables

This section is empty.

Functions

func ChildSpan added in v0.4.6

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

ChildSpan starts a new child span with specified tags.

func Close

func Close() error

Close the tracer.

func ComponentOpName added in v0.5.0

func ComponentOpName(cmp, target string) string

ComponentOpName returns a operation name for a component.

func ConsumerSpan added in v0.4.6

func ConsumerSpan(
	ctx context.Context,
	opName, cmp string,
	hdr map[string]string,
	tags ...opentracing.Tag,
) (opentracing.Span, context.Context)

ConsumerSpan starts a new consumer span.

func EsSpan added in v0.26.3

func EsSpan(ctx context.Context, opName, cmp, user, uri, method, body string, hostPool []string) opentracing.Span

EsSpan starts a new elasticsearch child span with specified tags

func FinishHTTPSpan

func FinishHTTPSpan(sp opentracing.Span, code int)

FinishHTTPSpan finishes a HTTP span by providing a HTTP status code.

func HTTPOpName added in v0.4.0

func HTTPOpName(method, path string) string

HTTPOpName return a string representation of the HTTP request operation.

func HTTPSpan added in v0.4.6

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

HTTPSpan starts a new HTTP span.

func SQLSpan added in v0.4.6

func SQLSpan(
	ctx context.Context,
	opName, cmp, sqlType, instance, user, stmt string,
	tags ...opentracing.Tag,
) (opentracing.Span, context.Context)

SQLSpan starts a new SQL child span with specified tags.

func Setup

func Setup(name, ver, agent, typ string, prm float64) error

Setup tracing by providing all necessary parameters.

func SpanError added in v0.4.6

func SpanError(sp opentracing.Span)

SpanError finishes a span with a error indicator.

func SpanSuccess added in v0.4.6

func SpanSuccess(sp opentracing.Span)

SpanSuccess finishes a span with a success indicator.

Types

This section is empty.

Directories

Path Synopsis
Package sns provides a set of common interfaces and structs for publishing messages to AWS SNS.
Package sns provides a set of common interfaces and structs for publishing messages to AWS SNS.

Jump to

Keyboard shortcuts

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