instrumentation

package
v0.0.0-...-422593f Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsServer

type MetricsServer struct {
	// contains filtered or unexported fields
}

func NewMetricsServer

func NewMetricsServer(port int, registry *prometheus.Registry, logger log.Logger) *MetricsServer

NewMetricsServer returns a server exposing Prometheus metrics.

func (*MetricsServer) Start

func (s *MetricsServer) Start() error

Start the instrumentation server.

func (*MetricsServer) Stop

func (s *MetricsServer) Stop()

Stop closes the instrumentation server.

type TracerTransport

type TracerTransport struct {
	Next http.RoundTripper
}

TracerTransport uses opentracing.GlobalTracer() to inject request trace span (if any) to the request headers, then it passes then handling to Next, or to http.DefaultTransport if Next is nil.

func (TracerTransport) RoundTrip

func (t TracerTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL