Documentation
¶
Index ¶
- Constants
- func AppendTracingKeys(keys []string)
- func GRPCUnaryClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, ...) error
- func GRPCUnaryServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (resp any, err error)
- func GetTracingIDKey() string
- func GetTracingKeys() []string
- func GinMiddleware() gin.HandlerFunc
- func NewGORMLogger(config gormlogger.Config) gormlogger.Interface
- func NewLogrusHook() logrus.Hook
- func Parse(ctx context.Context) (labels map[string]string)
- func SetTracingIDGenerator(generator TracingIDGenerator)
- func SetTracingIDKey(key string)
- func Trace(ctx context.Context) context.Context
- type LogrusHook
- type TracingIDGenerator
Constants ¶
View Source
const (
DefaultTracingIDKey = "TracingID"
)
Variables ¶
This section is empty.
Functions ¶
func AppendTracingKeys ¶
func AppendTracingKeys(keys []string)
func GRPCUnaryClientInterceptor ¶
func GRPCUnaryClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
func GRPCUnaryServerInterceptor ¶
func GRPCUnaryServerInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)
func GetTracingIDKey ¶
func GetTracingIDKey() string
func GetTracingKeys ¶
func GetTracingKeys() []string
func GinMiddleware ¶
func GinMiddleware() gin.HandlerFunc
func NewGORMLogger ¶
func NewGORMLogger(config gormlogger.Config) gormlogger.Interface
func NewLogrusHook ¶
func SetTracingIDGenerator ¶
func SetTracingIDGenerator(generator TracingIDGenerator)
func SetTracingIDKey ¶
func SetTracingIDKey(key string)
Types ¶
type LogrusHook ¶
type LogrusHook struct{}
func (*LogrusHook) Levels ¶
func (hook *LogrusHook) Levels() []logrus.Level
type TracingIDGenerator ¶
type TracingIDGenerator func() string
Click to show internal directories.
Click to hide internal directories.