tracing

package
Version: v0.0.0-...-6719cd2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

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

func New(serviceName string, trcCfg *config.Tracing) (*Tracer, error)

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.

func (*Tracer) Close

func (t *Tracer) Close()

Close stops the Tracer and cleans up resources. It is not thread-safe.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL