Documentation ¶
Overview ¶
Package tracing assists with reporting OpenTracing traces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateMetric ¶
func UpdateMetric(span opentracing.Span, metric Metric)
UpdateMetric arrranges for the given metric to be updated with the duration of the span (in seconds).
Types ¶
type Metric ¶
type Metric interface { prometheus.Metric Observe(float64) }
Metric is satisfied by prometheus.Summary and prometheus.Histogram.
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
A Tracer reports OpenTracing traces to a server.
func New ¶
New constructs a tracer and sets it as the global opentracing tracer. Call this early on from main functions to initialize Jaeger/OpenTracing. The locator described in trcCfg.Tracing.Locator should resolve to ports that accept jaeger.thrift over HTTP directly from clients. If err != nil, the returned tracer should be Closed to clean up resources and flush its buffer before program exit.