Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGrpcInternal = status.New(codes.Internal, "internal server error").Err()
Functions ¶
func UnaryClientInterceptor ¶
func UnaryClientInterceptor(ignore ...string) grpc.UnaryClientInterceptor
UnaryClientInterceptor input ctx assume that it contain telemetry instance as well as invoker already under our telemetry UnaryClientInterceptor implement:
- recovery
- detail log during errors (+ in recovery also)
- measure execution time
Types ¶
type MW ¶
type MW struct {
// contains filtered or unexported fields
}
func (*MW) GrpcUnaryClientInterceptorAll ¶
func (t *MW) GrpcUnaryClientInterceptorAll(ignore ...string) grpc.UnaryClientInterceptor
GrpcUnaryClientInterceptorAll setup recovery, metrics, tracing and debug option according goal of our framework Execution order:
- opentracing injection via otgrpc.OpenTracingClientInterceptor
- recovery, measure execution time + debug log via own UnaryClientInterceptor
- metrics via metrics.UnaryClientInterceptor
func (*MW) GrpcUnaryServerInterceptor ¶
func (t *MW) GrpcUnaryServerInterceptor(ignore ...string) grpc.UnaryServerInterceptor
GrpcUnaryServerInterceptor the most important create new telepresence instance + fill trace ids
implements: * new telepresence instance * fill trace ids * recovery * detail log during errors (+ in recovery also) * measure execution time
func (*MW) UnaryClientInterceptorAll ¶
func (t *MW) UnaryClientInterceptorAll(ignore ...string) grpc.UnaryServerInterceptor
UnaryClientInterceptorAll setup recovery, metrics, tracing and debug option according goal of our framework Execution order:otelgrpc
- opentracing injection via otgrpc.OpenTracingServerInterceptor
- ctx new instance, recovery, measure execution time + debug log via own GrpcUnaryServerInterceptor
- metrics via metrics.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.