Documentation ¶
Index ¶
- Constants
- type Handler
- func (h *Handler) Close(ctx context.Context) error
- func (h *Handler) Init()
- func (h *Handler) MetricHandler(req *restful.Request, rsp *restful.Response)
- func (h *Handler) MetricMiddleware(req *restful.Request, rsp *restful.Response, chain *restful.FilterChain)
- func (h *Handler) MetricRegistry(meter metric.Meter)
- func (h *Handler) Name() string
- func (h *Handler) Priority() int
Constants ¶
View Source
const AppName = "metrics"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { ioc.ObjectImpl RequestTotalName string `json:"requestTotalName" yaml:"requestTotalName"` // Counter 标签名称 RequestHistogramName string `json:"requestHistogramName" yaml:"requestHistogramName"` // Histogram 标签名称 HttpRequestTotal metric.Int64Counter // 请求总数 HttpRequestDurationHistogram metric.Float64Histogram // 请求时长柱状图 // contains filtered or unexported fields }
func (*Handler) MetricHandler ¶
func (h *Handler) MetricHandler(req *restful.Request, rsp *restful.Response)
func (*Handler) MetricMiddleware ¶
func (h *Handler) MetricMiddleware(req *restful.Request, rsp *restful.Response, chain *restful.FilterChain)
MetricMiddleware 指标中间件
func (*Handler) MetricRegistry ¶
MetricRegistry 创建指标
Click to show internal directories.
Click to hide internal directories.