Documentation ¶
Index ¶
- Constants
- func AddCount(ctx context.Context, name string, value int64, ...) error
- func GetExporter() http.Handler
- func GetMetricsProvider() metric.MeterProvider
- func NewMetricsHandler(handler http.Handler, metricMethods []MetricType, ignoredEndpoints ...string) http.Handler
- func RegisterCounter(name, description string) error
- func RegisterRequestCodeCounter(recorder *StatusRecorder, r *http.Request)
- func RegisterRequestCounter(r *http.Request)
- func RegisterTotalRequestCounter(r *http.Request)
- func RegisterUpDownSumObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error
- func RegisterValueObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error
- type Filter
- type Handler
- type MetricType
- type Metrics
- type StatusRecorder
Constants ¶
View Source
const ( RequestCounter = "http.server.request_count" RequestCountDescription = "Request counter" TotalRequestCounter = "http.server.total_request_count" TotalRequestDescription = "Total return code counter" ReturnCodeCounter = "http.server.return_code_counter" ReturnCodeCounterDescription = "Return code counter" Method = "method" URI = "uri" ReturnCode = "return_code" )
View Source
const ( ActiveSessionCounter = "zitadel.active_session_counter" ActiveSessionCounterDescription = "Active session counter" SpoolerDivCounter = "zitadel.spooler_div_milliseconds" SpoolerDivCounterDescription = "Spooler div from last successful run to now in milliseconds" Database = "database" ViewName = "view_name" )
Variables ¶
This section is empty.
Functions ¶
func GetExporter ¶
func GetMetricsProvider ¶
func GetMetricsProvider() metric.MeterProvider
func NewMetricsHandler ¶
func RegisterCounter ¶
func RegisterRequestCodeCounter ¶
func RegisterRequestCodeCounter(recorder *StatusRecorder, r *http.Request)
func RegisterRequestCounter ¶
func RegisterUpDownSumObserver ¶
func RegisterUpDownSumObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error
func RegisterValueObserver ¶
func RegisterValueObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error
Types ¶
type MetricType ¶
type MetricType int32
const ( MetricTypeTotalCount MetricType = iota MetricTypeStatusCode MetricTypeRequestCount )
type Metrics ¶
type Metrics interface { GetExporter() http.Handler GetMetricsProvider() metric.MeterProvider RegisterCounter(name, description string) error AddCount(ctx context.Context, name string, value int64, labels map[string]attribute.Value) error RegisterUpDownSumObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error RegisterValueObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error }
var M Metrics
type StatusRecorder ¶
type StatusRecorder struct { http.ResponseWriter Status int }
func (*StatusRecorder) WriteHeader ¶
func (r *StatusRecorder) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.