Documentation ¶
Index ¶
- Constants
- func New(componentName string) (monitoring.Monitoring, error)
- type Monitoring
- func (m *Monitoring) AddFieldToSpan(ctx context.Context, key string, value interface{})
- func (m *Monitoring) AddFieldToTrace(ctx context.Context, key string, value interface{})
- func (m *Monitoring) Close() error
- func (m *Monitoring) GRPCUnaryClientInterceptor() grpc.UnaryClientInterceptor
- func (m *Monitoring) GRPCUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func (m *Monitoring) StartSpan(ctx context.Context, name string) (context.Context, monitoring.Span)
- func (m *Monitoring) WrapHTTP(handler http.Handler, name string) http.Handler
- func (m *Monitoring) WrapHTTPTransport(r http.RoundTripper) http.RoundTripper
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) WrapHTTPTransport ¶
func (m *Monitoring) WrapHTTPTransport(r http.RoundTripper) http.RoundTripper
WrapHTTPTransport will add monitoring middleware to an HTTP Transport. This allows for trace propagation.
Click to show internal directories.
Click to hide internal directories.