Documentation ¶
Overview ¶
Package observability implements various observability handlers for the API servers
Index ¶
Constants ¶
View Source
const ( // MetricSubsystem is the subsystem for the metric MetricSubsystem = "api_server" // MetricName is the name of the metric MetricName = "request_duration_seconds" )
Variables ¶
This section is empty.
Functions ¶
func LogResponseHandler ¶
func LogResponseHandler(servername string) mux.MiddlewareFunc
LogResponseHandler is a middleware that logs the response code and other various information about the request
Types ¶
type TelemetryMiddlewareFactory ¶
type TelemetryMiddlewareFactory interface {
Middleware(serverName string) mux.MiddlewareFunc
}
TelemetryMiddlewareFactory creates a telemetry middleware tagged with a given server name
func NewTelemetryMiddlewareFactory ¶
func NewTelemetryMiddlewareFactory(telemetry telemetry.Component) TelemetryMiddlewareFactory
NewTelemetryMiddlewareFactory creates a new TelemetryMiddlewareFactory
This function must be called only once for a given telemetry Component, as it creates a new metric, and Prometheus panics if the same metric is registered twice.
Click to show internal directories.
Click to hide internal directories.