Documentation
¶
Index ¶
- type PrometheusMetrics
- func (p *PrometheusMetrics) DecHTTPInFlight()
- func (p *PrometheusMetrics) GinMiddleware() gin.HandlerFunc
- func (p *PrometheusMetrics) IncHTTPInFlight()
- func (p *PrometheusMetrics) PrometheusHandler() gin.HandlerFunc
- func (p *PrometheusMetrics) RecordHTTPRequest(method, path string, status int, duration time.Duration)
- func (p *PrometheusMetrics) SetRepositoryCount(count int64)
- func (p *PrometheusMetrics) SetTransactionCount(count int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusMetrics ¶
type PrometheusMetrics struct {
// contains filtered or unexported fields
}
PrometheusMetrics provides Prometheus-compatible metrics
func NewPrometheusMetrics ¶
func NewPrometheusMetrics() *PrometheusMetrics
NewPrometheusMetrics creates a new Prometheus metrics instance
func (*PrometheusMetrics) DecHTTPInFlight ¶
func (p *PrometheusMetrics) DecHTTPInFlight()
DecHTTPInFlight decrements in-flight HTTP requests
func (*PrometheusMetrics) GinMiddleware ¶
func (p *PrometheusMetrics) GinMiddleware() gin.HandlerFunc
Middleware for automatic metrics collection
func (*PrometheusMetrics) IncHTTPInFlight ¶
func (p *PrometheusMetrics) IncHTTPInFlight()
IncHTTPInFlight increments in-flight HTTP requests
func (*PrometheusMetrics) PrometheusHandler ¶
func (p *PrometheusMetrics) PrometheusHandler() gin.HandlerFunc
PrometheusHandler returns a Gin handler for Prometheus metrics
func (*PrometheusMetrics) RecordHTTPRequest ¶
func (p *PrometheusMetrics) RecordHTTPRequest(method, path string, status int, duration time.Duration)
RecordHTTPRequest records an HTTP request
func (*PrometheusMetrics) SetRepositoryCount ¶
func (p *PrometheusMetrics) SetRepositoryCount(count int64)
SetRepositoryCount sets the current repository count
func (*PrometheusMetrics) SetTransactionCount ¶
func (p *PrometheusMetrics) SetTransactionCount(count int64)
SetTransactionCount sets the current transaction count
Click to show internal directories.
Click to hide internal directories.