metrics

package
v0.0.0-...-dc8f43e Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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