metrics

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 5 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 Prometheus指标收集器

func NewPrometheusMetrics

func NewPrometheusMetrics() *PrometheusMetrics

NewPrometheusMetrics 创建Prometheus指标收集器

func (*PrometheusMetrics) HTTPMiddleware

func (m *PrometheusMetrics) HTTPMiddleware() echo.MiddlewareFunc

HTTPMiddleware HTTP指标中间件

func (*PrometheusMetrics) RecordCacheHit

func (m *PrometheusMetrics) RecordCacheHit(cacheType, operation string)

RecordCacheHit 记录缓存命中

func (*PrometheusMetrics) RecordCacheMiss

func (m *PrometheusMetrics) RecordCacheMiss(cacheType, operation string)

RecordCacheMiss 记录缓存未命中

func (*PrometheusMetrics) SetActiveConnections

func (m *PrometheusMetrics) SetActiveConnections(count int)

SetActiveConnections 设置活跃连接数

func (*PrometheusMetrics) SetDatabaseConnections

func (m *PrometheusMetrics) SetDatabaseConnections(dbType, status string, count int)

SetDatabaseConnections 设置数据库连接数

Jump to

Keyboard shortcuts

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