Documentation
¶
Index ¶
- func StreamServerInterceptor(duck *duckbug.Duck, options ...Option) grpc.StreamServerInterceptor
- func UnaryServerInterceptor(duck *duckbug.Duck, options ...Option) grpc.UnaryServerInterceptor
- type Config
- type Option
- func WithCaptureMetadata(enabled bool) Option
- func WithCapturePanics(enabled bool) Option
- func WithCaptureTransactions(enabled bool) Option
- func WithIgnoredMethodPrefixes(prefixes ...string) Option
- func WithIgnoredMethods(methods ...string) Option
- func WithProductionDefaults() Option
- func WithRepanic(enabled bool) Option
- func WithShouldCapture(fn func(code codes.Code) bool) Option
- func WithSkipMethod(fn func(fullMethod string) bool) Option
- func WithTransactionSampleRate(rate float64) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(duck *duckbug.Duck, options ...Option) grpc.StreamServerInterceptor
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(duck *duckbug.Duck, options ...Option) grpc.UnaryServerInterceptor
Types ¶
type Config ¶
type Config struct {
CapturePanics bool
Repanic bool
CaptureMetadata bool
CaptureTransactions bool
TransactionSampleRate float64
IgnoredMethods []string
IgnoredMethodPrefixes []string
SkipMethod func(fullMethod string) bool
// ShouldCapture decides whether an RPC that finished with the given code is
// reported as an error. When nil, server-fault codes are captured.
ShouldCapture func(code codes.Code) bool
}
type Option ¶
type Option func(*Config)
func WithCaptureMetadata ¶
func WithCapturePanics ¶
func WithCaptureTransactions ¶
func WithIgnoredMethods ¶
func WithProductionDefaults ¶
func WithProductionDefaults() Option
WithProductionDefaults enables the most common gRPC server production setup: panic capture, metadata capture, and transaction capture with conservative sampling.
func WithRepanic ¶
func WithSkipMethod ¶
Click to show internal directories.
Click to hide internal directories.