Documentation ¶
Index ¶
- Constants
- func GRPCStreamClientInterceptor() grpc.DialOption
- func GRPCStreamServerInterceptor() grpc.ServerOption
- func GRPCUnaryClientInterceptor() grpc.DialOption
- func GRPCUnaryServerInterceptor() grpc.ServerOption
- func Init(target string) func()
- func InsertHeader(r *http.Request) *http.Request
- func Open(driverName, dataSourceName string) (*sql.DB, error)
- func OpenDB(c driver.Connector) *sql.DB
- func Report(ctx context.Context, e event.Event, metadata ...any) context.Context
- func SetInstrumenter(key Key)
- func WrapHTTPClient(client *http.Client) *http.Client
- func WrapHandler(handler http.Handler) http.Handler
- func WrapHandlerFunc(handlerFunc http.HandlerFunc) http.HandlerFunc
- type Instrumenter
- type Key
Constants ¶
View Source
const ( EventStart = event.EventStart EventEnd = event.EventEnd EventCall = event.EventCall EventReturn = event.EventReturn EventDBCall = event.EventDBCall EventDBReturn = event.EventDBReturn )
Variables ¶
This section is empty.
Functions ¶
func GRPCStreamClientInterceptor ¶
func GRPCStreamClientInterceptor() grpc.DialOption
func GRPCStreamServerInterceptor ¶
func GRPCStreamServerInterceptor() grpc.ServerOption
functions for GRPC and DB support -- not in demo!
func GRPCUnaryClientInterceptor ¶
func GRPCUnaryClientInterceptor() grpc.DialOption
func GRPCUnaryServerInterceptor ¶
func GRPCUnaryServerInterceptor() grpc.ServerOption
func SetInstrumenter ¶
func SetInstrumenter(key Key)
func WrapHandlerFunc ¶
func WrapHandlerFunc(handlerFunc http.HandlerFunc) http.HandlerFunc
Types ¶
type Instrumenter ¶
type Instrumenter interface { Init() func() InsertHeader(r *http.Request) *http.Request Report(ctx context.Context, e event.Event, metadata ...any) context.Context WrapHandlerFunc(handlerFunc http.HandlerFunc) http.HandlerFunc WrapHTTPClient(client *http.Client) *http.Client WrapHandler(handler http.Handler) http.Handler }
Click to show internal directories.
Click to hide internal directories.