interceptors

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor(m *appoptics.MeasurementSet) grpc.StreamServerInterceptor

Creates a StreamServerInterceptor that submits AO metrics using the given MeasurementSet. See InstrumentedServerStream for a list of metrics emitted

func UnaryServerInterceptor

func UnaryServerInterceptor(m *appoptics.MeasurementSet) grpc.UnaryServerInterceptor

Creates a UnaryServerInterceptor that submits AO metrics using the given MeasurementSet. Emits counts of requests received, counts of requests handled (tagged by status code) and timings

Types

type InstrumentedServer

type InstrumentedServer struct {
	// contains filtered or unexported fields
}

func NewInstrumentedServer

func NewInstrumentedServer(m *appoptics.MeasurementSet, service string, method string, tags map[string]interface{}) *InstrumentedServer

type InstrumentedServerStream

type InstrumentedServerStream struct {
	grpc.ServerStream
	*InstrumentedServer
}

InstrumentedServerStream implements gRPC's `Stream` interface, providing metrics for the number of times Send- and RecvMsg() are called. Timing metrics are not emitted

func (*InstrumentedServerStream) RecvMsg

func (s *InstrumentedServerStream) RecvMsg(m interface{}) error

func (*InstrumentedServerStream) SendMsg

func (s *InstrumentedServerStream) SendMsg(m interface{}) error

Jump to

Keyboard shortcuts

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