Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrServerIsNotSet = fmt.Errorf("traking object is not set")
)
Functions ¶
func UnaryClientInterceptor ¶
func UnaryClientInterceptor() func( ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() func( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
Types ¶
type HTTPStatusResponseWriter ¶
type HTTPStatusResponseWriter struct { http.ResponseWriter Status int Response []byte }
func NewHTTPStatusResponseWriter ¶
func NewHTTPStatusResponseWriter(in http.ResponseWriter) *HTTPStatusResponseWriter
func (*HTTPStatusResponseWriter) Write ¶
func (r *HTTPStatusResponseWriter) Write(in []byte) (int, error)
func (*HTTPStatusResponseWriter) WriteHeader ¶
func (r *HTTPStatusResponseWriter) WriteHeader(statusCode int)
type HttpTracker ¶
type HttpTracker interface { MetricTracker SetPathRetriever(PathRetriever) // server mw NewHttpMiddlewareWithOption() func(next http.Handler) http.Handler // client mw Do(c httpClient, req *http.Request) (*http.Response, error) }
func NewHttpMetric ¶
func NewHttpMetric(pr PathRetriever) HttpTracker
type MetricTracker ¶
type MetricTracker interface {
SetUp() error
}
func NewDatabaseTracker ¶
func NewDatabaseTracker(db *sql.DB) MetricTracker
func NewGrpcClientTracker ¶
func NewGrpcClientTracker() MetricTracker
func NewGrpcTracker ¶
func NewGrpcTracker(server *grpc.Server) MetricTracker
type MetricsReader ¶
type MetricsReader interface { AddReaderTopicsInUse() MetricsReader RmReaderTopicsInUse() MetricsReader AddReaderTopicFatalError(topic string, code int) MetricsReader AddReaderTopicProcessError(topic string) MetricsReader AddReaderTopicReadEvents(topic string, num int) MetricsReader AddReaderTopicCommitEvents(topic string, num int) MetricsReader AddReaderTopicDecodeEvents(topic string, num int) MetricsReader AddReaderTopicSkippedEvents(topic string, num int) MetricsReader AddReaderTopicErrorEvents(topic string, num int) MetricsReader AddReaderTopicHandlingTime(topic string, duration time.Duration) MetricsReader AddGarbageRecords(num int) MetricsReader }
func NewCollectorMetricsReader ¶
func NewCollectorMetricsReader() MetricsReader
type PathRetriever ¶
func DefaultHTTPPathRetriever ¶
func DefaultHTTPPathRetriever() PathRetriever
Click to show internal directories.
Click to hide internal directories.