otelmonitoring

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TraceHeader string = "x-trace-headers"

Variables

This section is empty.

Functions

func New

func New(componentName string) (monitoring.Monitoring, error)

Types

type Monitoring

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

func (*Monitoring) AddFieldToSpan

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

func (*Monitoring) AddFieldToTrace

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

func (*Monitoring) Close

func (m *Monitoring) Close() error

func (*Monitoring) GRPCUnaryClientInterceptor

func (m *Monitoring) GRPCUnaryClientInterceptor() grpc.UnaryClientInterceptor

func (*Monitoring) GRPCUnaryServerInterceptor

func (m *Monitoring) GRPCUnaryServerInterceptor() grpc.UnaryServerInterceptor

GRPCUnaryServerInterceptor starts a beeline span for each grpc call.

func (*Monitoring) StartSpan

func (m *Monitoring) StartSpan(ctx context.Context, name string) (context.Context, monitoring.Span)

func (*Monitoring) WrapHTTP

func (m *Monitoring) WrapHTTP(handler http.Handler, name string) http.Handler

WrapHTTP will add monitoring middleware to an http handler

func (*Monitoring) WrapHTTPTransport

func (m *Monitoring) WrapHTTPTransport(r http.RoundTripper) http.RoundTripper

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

Jump to

Keyboard shortcuts

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