Documentation
¶
Index ¶
- Variables
- type Interceptor
- type InterecptorOption
- type Metrics
- func (m *Metrics) Collect(c chan<- prom.Metric)
- func (m *Metrics) Describe(c chan<- *prom.Desc)
- func (m *Metrics) ReportHandled(callType, service, method, code string)
- func (m *Metrics) ReportHandledSeconds(callType, service, method, code string, val float64)
- func (m *Metrics) ReportStarted(callType, service, method string)
- type MetricsOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultClientMetrics = NewClientMetrics() DefaultServerMetrics = NewServerMetrics() )
Functions ¶
This section is empty.
Types ¶
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
func NewInterceptor ¶
func NewInterceptor(opts ...InterecptorOption) *Interceptor
func (*Interceptor) WrapStreamingClient ¶
func (i *Interceptor) WrapStreamingClient(connect.StreamingClientFunc) connect.StreamingClientFunc
func (*Interceptor) WrapStreamingHandler ¶
func (i *Interceptor) WrapStreamingHandler(connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
func (*Interceptor) WrapUnary ¶
func (i *Interceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
type InterecptorOption ¶
type InterecptorOption func(*interceptorOptions)
func WithClientMetrics ¶
func WithClientMetrics(m *Metrics) InterecptorOption
func WithServerMetrics ¶
func WithServerMetrics(m *Metrics) InterecptorOption
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewClientMetrics ¶
func NewClientMetrics(opts ...MetricsOption) *Metrics
func NewServerMetrics ¶
func NewServerMetrics(opts ...MetricsOption) *Metrics
NewServerMetrics creates new Connect metrics for server-side handling.
func (*Metrics) ReportHandled ¶
func (*Metrics) ReportHandledSeconds ¶
func (*Metrics) ReportStarted ¶
type MetricsOption ¶
type MetricsOption func(opts *metricsOptions)
func WithConstLabels ¶
func WithConstLabels(labels prom.Labels) MetricsOption
func WithHistogram ¶
func WithHistogram(enabled bool) MetricsOption
func WithHistogramBuckets ¶
func WithHistogramBuckets(buckets []float64) MetricsOption
func WithNamespace ¶
func WithNamespace(namespace string) MetricsOption
func WithSubsystem ¶
func WithSubsystem(subsystem string) MetricsOption
Click to show internal directories.
Click to hide internal directories.