Documentation ¶
Index ¶
- Variables
- func AddressToString(addr *pb.TcpAddress) string
- func AddressesToString(addrs []pb.TcpAddress) string
- func IPToString(ip *pb.IPAddress) string
- func IPV4(a1, a2, a3, a4 uint8) *pb.IPAddress
- func NewGrpcServer() *grpc.Server
- func ParseIPV4(ip string) (*pb.IPAddress, error)
- func WithTelemetry(handler http.Handler) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestDurationBucketsSeconds = append(append(append(append( prometheus.LinearBuckets(0.01, 0.01, 5), prometheus.LinearBuckets(0.1, 0.1, 5)...), prometheus.LinearBuckets(1, 1, 5)...), prometheus.LinearBuckets(10, 10, 5)...), )
define latency buckets to record (seconds)
View Source
var ResponseSizeBuckets = append(append(append(append( prometheus.LinearBuckets(100, 100, 5), prometheus.LinearBuckets(1000, 1000, 5)...), prometheus.LinearBuckets(10000, 10000, 5)...), prometheus.LinearBuckets(1000000, 1000000, 5)...), )
define response size buckets (bytes)
Functions ¶
func AddressToString ¶
func AddressToString(addr *pb.TcpAddress) string
func AddressesToString ¶
func AddressesToString(addrs []pb.TcpAddress) string
func IPToString ¶
func NewGrpcServer ¶
returns a grpc server pre-configured with prometheus interceptors
func WithTelemetry ¶ added in v0.3.0
func WithTelemetry(handler http.Handler) http.HandlerFunc
instrument HTTP server with prometheus
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.