Documentation ¶
Index ¶
- Constants
- func ChildSpan(ctx context.Context, opName, cmp string, tags ...opentracing.Tag) (opentracing.Span, context.Context)
- func Close() error
- func ComponentOpName(cmp, target string) string
- func ConsumerSpan(ctx context.Context, opName, cmp string, hdr map[string]string, ...) (opentracing.Span, context.Context)
- func FinishHTTPSpan(sp opentracing.Span, code int)
- func HTTPOpName(cmp, method, path string) string
- func HTTPSpan(path string, r *http.Request) (opentracing.Span, *http.Request)
- func SQLSpan(ctx context.Context, opName, cmp, sqlType, instance, user, stmt string, ...) (opentracing.Span, context.Context)
- func Setup(name, ver, agentAddress, samplerType string, samplerParam float64) error
- func SpanError(sp opentracing.Span)
- func SpanSuccess(sp opentracing.Span)
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 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 ComponentOpName ¶ added in v0.5.0
ComponentOpName returns a operation name for a compoent.
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 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
HTTPOpName return a string representation of the HTTP request operation.
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 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.
Click to show internal directories.
Click to hide internal directories.