Documentation
¶
Index ¶
- Constants
- func ConfigureTracing(tc TraceConfig) error
- func GetHTTPMux() *http.ServeMux
- func GetHTTPServer() *http.Server
- func HTTPClose() error
- func HTTPShutdown() error
- func HTTPStart() error
- func InjectGrpcClientTrace(opts ...grpc.DialOption) []grpc.DialOption
- func InjectGrpcServerTrace(opts ...grpc.ServerOption) []grpc.ServerOption
- func RegisterGatherer(g prom.Gatherer)
- func Start() error
- func Stop()
- func TracingEnabled() bool
- type TraceConfig
Constants ¶
const (
// ServiceName is our Jaeger and Prometheus service names.
ServiceName = "CRI-RM"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigureTracing ¶
func ConfigureTracing(tc TraceConfig) error
ConfigureTracing configures Jaeger-tracing.
func GetHTTPMux ¶
GetHTTPMux get our singleton HTTP request multiplexer for instrumentation.
func GetHTTPServer ¶
GetHTTPServer returns our singleton HTTP server.
func HTTPShutdown ¶
func HTTPShutdown() error
HTTPShutdown does a graceful Shutdown() of our HTTP server.
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 ¶
RegisterGatherer registers a new prometheus Gatherer.
func TracingEnabled ¶
func TracingEnabled() bool
TracingEnabled returns true if the tracing sampler is not disabled.
Types ¶
type TraceConfig ¶
type TraceConfig float64
TraceConfig represents a pre-defined instrumentation configuration.
const ( // Disabled is the trace configuration for disabling tracing. Disabled TraceConfig = 0.0 // Production is a trace configuration for production use. Production TraceConfig = 0.1 // Testing is a trace configuration for testing. Testing TraceConfig = 1.0 // Full is the trace configuration for full probabilistic sampling. Full TraceConfig = 1.0 )
func (TraceConfig) MarshalJSON ¶
func (tc TraceConfig) MarshalJSON() ([]byte, error)
MarshalJSON is the JSON marshaller for TraceConfig values.
func (TraceConfig) Sampler ¶
func (tc TraceConfig) Sampler() trace.Sampler
Sampler returns a trace.Sampler corresponding to the TraceConfig value.
func (TraceConfig) String ¶
func (tc TraceConfig) String() string
Sampler returns a trace.Sampler corresponding to the TraceConfig value.
func (*TraceConfig) UnmarshalJSON ¶
func (tc *TraceConfig) UnmarshalJSON(raw []byte) error
UnmarshalJSON is the JSON unmarshaller for TraceConfig values.