observability

package
v0.0.0-...-2b67f9f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

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