Documentation ¶
Index ¶
- Constants
- func Close() error
- func FinishHTTPSpan(sp opentracing.Span, code int)
- func FinishSpanWithError(sp opentracing.Span)
- func FinishSpanWithSuccess(sp opentracing.Span)
- func HTTPOpName(method, path string) string
- func Setup(name, ver, agentAddress, samplerType string, samplerParam float64) error
- func StartChildSpan(ctx context.Context, opName, cmp string, tags ...opentracing.Tag) (opentracing.Span, context.Context)
- func StartConsumerSpan(ctx context.Context, name, cmp string, hdr map[string]string) (opentracing.Span, context.Context)
- func StartHTTPSpan(path string, r *http.Request) (opentracing.Span, *http.Request)
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 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
HTTPOpName return a string representation of the HTTP request operation.
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.