Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware extracts the OpenTracing context on all incoming HTTP requests, if present. if no trace ID is present in the headers, a trace is initiated.
The following tags are placed on all incoming HTTP requests: * http.method * http.hostname * http.port * http.remote_address
Outbound responses will be tagged with the following tags, if applicable: * http.status_code * error (if the status code is >= 500)
The returned HTTP Request includes the wrapped OpenTracing Span Context.
func TraceOutbound ¶
func TraceOutbound(r *http.Request, span opentracing.Span) error
TraceOutbound injects outbound HTTP requests with OpenTracing headers
Types ¶
type Config ¶
type Config struct {
Enabled bool
SamplerType string
SamplerParam float64
ReporterLogSpans bool
ReporterMaxQueueSize int
ReporterFlushInterval time.Duration
AgentHost string
AgentPort int
ServiceName string
}
Config defines the necessary configuration for instantiating a Tracer
func (Config) ConfigureTracer ¶
ConfigureTracer instantiates and configures the OpenTracer and returns the tracer closer
func (*Config) RegisterFlags ¶
RegisterFlags registers Tracer flags with pflags