monitoring

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFieldToSpan added in v0.1.31

func AddFieldToSpan(ctx context.Context, key string, value interface{})

func AddFieldToTrace

func AddFieldToTrace(ctx context.Context, key string, value interface{})

func Close added in v0.1.31

func Close() error

func UnaryClientInterceptor

func UnaryClientInterceptor() grpc.UnaryClientInterceptor

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor starts a beeline span for each grpc call.

func WrapHTTP

func WrapHTTP(handler http.Handler, name string) http.Handler

WrapHTTP will add monitoring middleware to an http handler

func WrapHTTPTransport

func WrapHTTPTransport(r http.RoundTripper) http.RoundTripper

WrapHTTPTransport will add monitoring middleware to an HTTP Transport. This allows for trace propagation.

Types

type Monitoring added in v0.1.31

type Monitoring interface {
	WrapHTTP(handler http.Handler, name string) http.Handler
	WrapHTTPTransport(r http.RoundTripper) http.RoundTripper
	GRPCUnaryClientInterceptor() grpc.UnaryClientInterceptor
	GRPCUnaryServerInterceptor() grpc.UnaryServerInterceptor
	StartSpan(ctx context.Context, name string) (context.Context, Span)
	AddFieldToSpan(ctx context.Context, key string, value interface{})
	AddFieldToTrace(ctx context.Context, key string, value interface{})
	Close() error
}
var Default Monitoring = &nullMonitoring{}

type Span added in v0.1.31

type Span interface {
	Finish() error
}

func StartSpan added in v0.1.31

func StartSpan(ctx context.Context, name string) (context.Context, Span)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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