Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterOption ¶
type CounterOption func(*prom.CounterOpts)
A CounterOption lets you add options to Counter metrics using With* funcs.
func WithConstLabels ¶
func WithConstLabels(labels prom.Labels) CounterOption
WithConstLabels allows you to add ConstLabels to Counter metrics.
type HistogramOption ¶
type HistogramOption func(*prom.HistogramOpts)
A HistogramOption lets you add options to Histogram metrics using With* funcs.
func WithHistogramBuckets ¶
func WithHistogramBuckets(buckets []float64) HistogramOption
WithHistogramBuckets allows you to specify custom bucket ranges for histograms if EnableHandlingTimeHistogram is on.
func WithHistogramConstLabels ¶
func WithHistogramConstLabels(labels prom.Labels) HistogramOption
WithHistogramConstLabels allows you to add custom ConstLabels to histograms metrics.
type PrometheusInterceptor ¶
type PrometheusInterceptor interface { prom.Collector connect.Interceptor EnableHandlingTimeHistogram(opts ...HistogramOption) }
func NewPrometheusInterceptor ¶
func NewPrometheusInterceptor(counterOpts ...CounterOption) PrometheusInterceptor
NewPrometheusInterceptor returns a PrometheusInterceptor object. It implements both the prometheus.Collector and connect.Interceptor interface.
Click to show internal directories.
Click to hide internal directories.