otelkit

package
v0.0.0-...-fe7ef4e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusServiceMeter

type PrometheusServiceMeter struct {
	metric.Meter
	// contains filtered or unexported fields
}

PrometheusServiceMeter provides 3 meters to measure: 1. Count number of requests 2. Measure response time 3. Count number of error requests

func (*PrometheusServiceMeter) Close

func (m *PrometheusServiceMeter) Close() error

func (*PrometheusServiceMeter) UnaryServerInterceptor

func (m *PrometheusServiceMeter) UnaryServerInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

UnaryServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Unary RPCs.

type PrometheusServiceMeterConfig

type PrometheusServiceMeterConfig struct {
	Addr                string    `long:"addr" env:"ADDR" description:"the prometheus exporter address" default:":2222"`
	Path                string    `long:"path" env:"PATH" description:"the prometheus exporter path" default:"/metrics"`
	Name                string    `long:"name" env:"NAME" description:"the unique instrumentation name" required:"true"`
	HistogramBoundaries []float64 `` /* 145-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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