Documentation
¶
Index ¶
- func ClientUnary() grpc.UnaryClientInterceptor
- func Middleware(service string, l *logger.Loggerx) func(http.Handler) http.Handler
- func ServerUnary(l *logger.Loggerx) grpc.UnaryServerInterceptor
- func Start(ctx context.Context, opt Options) (func(context.Context) error, error)
- func Transport(base http.RoundTripper) http.RoundTripper
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientUnary ¶
func ClientUnary() grpc.UnaryClientInterceptor
ClientUnary adds spans + propagation for outbound gRPC.
func Middleware ¶
Middleware wraps handlers with otelhttp and injects trace_id into ctx for logger.
func ServerUnary ¶
func ServerUnary(l *logger.Loggerx) grpc.UnaryServerInterceptor
ServerUnary returns an interceptor that both creates spans and injects trace_id for logger.
func Transport ¶
func Transport(base http.RoundTripper) http.RoundTripper
Transport wraps any RoundTripper so outbound HTTP gets spans + propagation.
Types ¶
Click to show internal directories.
Click to hide internal directories.