instrumentation

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// PrometheusMetricsPath is the URL path for exposing metrics to Prometheus.
	PrometheusMetricsPath = "/metrics"
)
View Source
const (
	// ServiceName is our service name in external tracing and metrics services.
	ServiceName = "CRI-RM"
)

Variables

This section is empty.

Functions

func GetHTTPMux

func GetHTTPMux() *http.ServeMux

GetHTTPMux returns our HTTP request mux for external services.

func InjectGrpcClientTrace

func InjectGrpcClientTrace(opts ...grpc.DialOption) []grpc.DialOption

InjectGrpcClientTrace injects gRPC dial options for instrumentation if necessary.

func InjectGrpcServerTrace

func InjectGrpcServerTrace(opts ...grpc.ServerOption) []grpc.ServerOption

InjectGrpcServerTrace injects gRPC server options for instrumentation if necessary.

func RegisterGatherer

func RegisterGatherer(g pclient.Gatherer)

RegisterGatherer registers a new prometheus Gatherer.

func Restart

func Restart() error

Restart restarts our internal instrumentation services.

func Start

func Start() error

Start our internal instrumentation services.

func Stop

func Stop()

Stop stops our internal instrumentation services.

func TracingEnabled

func TracingEnabled() bool

TracingEnabled returns true if the Jaeger tracing sampler is not disabled.

Types

type Sampling

type Sampling float64

Sampling defines how often trace samples are taken.

const (
	// Disabled is the trace configuration for disabling tracing.
	Disabled Sampling = 0.0
	// Production is a trace configuration for production use.
	Production Sampling = 0.1
	// Testing is a trace configuration for testing.
	Testing Sampling = 1.0
)

func (Sampling) MarshalJSON

func (s Sampling) MarshalJSON() ([]byte, error)

MarshalJSON is the JSON marshaller for Sampling values.

func (*Sampling) Parse

func (s *Sampling) Parse(value string) error

Parse parses the given string to a Sampling value.

func (Sampling) Sampler

func (s Sampling) Sampler() trace.Sampler

Sampler returns a trace.Sampler corresponding to the Sampling value.

func (Sampling) String

func (s Sampling) String() string

String returns the Sampling value as a string.

func (*Sampling) UnmarshalJSON

func (s *Sampling) UnmarshalJSON(raw []byte) error

UnmarshalJSON is the JSON unmarshaller for Sampling values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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