observability

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package observability provides logging and metrics collection middleware for YARPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextExtractor

type ContextExtractor func(context.Context) zapcore.Field

A ContextExtractor pulls any relevant request-scoped data (e.g., tracing spans) from the request's Context.

func NewNopContextExtractor

func NewNopContextExtractor() ContextExtractor

NewNopContextExtractor returns a no-op ContextExtractor.

type Middleware

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

Middleware is logging and metrics middleware for all RPC types.

func NewMiddleware

func NewMiddleware(logger *zap.Logger, reg *pally.Registry, extract ContextExtractor) *Middleware

NewMiddleware constructs a Middleware.

func (*Middleware) Call

Call implements middleware.UnaryOutbound.

func (*Middleware) CallOneway

CallOneway implements middleware.OnewayOutbound.

func (*Middleware) Handle

Handle implements middleware.UnaryInbound.

func (*Middleware) HandleOneway

func (m *Middleware) HandleOneway(ctx context.Context, req *transport.Request, h transport.OnewayHandler) error

HandleOneway implements middleware.OnewayInbound.

Jump to

Keyboard shortcuts

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