Documentation
¶
Index ¶
- Constants
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func EnsureTrace(ctx context.Context) context.Context
- func Error(msg string, args ...any)
- func ErrorContext(ctx context.Context, msg string, args ...any)
- func GenerateSpanID() string
- func GenerateTraceID() string
- func GetTraceparentHeader(ctx context.Context) string
- func Info(msg string, args ...any)
- func InfoContext(ctx context.Context, msg string, args ...any)
- func Init(json bool)
- func LoggerMiddleware() gin.HandlerFunc
- func LoggerMiddlewareWithConfig(config LoggerConfig) gin.HandlerFunc
- func Panic(msg string, args ...any)
- func PanicContext(ctx context.Context, msg string, args ...any)
- func ParseTraceparent(header string) (traceID, spanID string, ok bool)
- func RecoverAndExit()
- func RecoveryMiddleware() gin.HandlerFunc
- func TraceMiddleware() gin.HandlerFunc
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
- func WithIdentity(ctx context.Context, id Identity) context.Context
- func WithTrace(ctx context.Context, tc TraceContext) context.Context
- type Handler
- type Identity
- type LoggerConfig
- type Options
- type TraceContext
Constants ¶
View Source
const ServiceName = "dify-plugin-daemon"
Variables ¶
This section is empty.
Functions ¶
func GenerateSpanID ¶
func GenerateSpanID() string
func GenerateTraceID ¶
func GenerateTraceID() string
func GetTraceparentHeader ¶
func LoggerMiddleware ¶
func LoggerMiddleware() gin.HandlerFunc
func LoggerMiddlewareWithConfig ¶
func LoggerMiddlewareWithConfig(config LoggerConfig) gin.HandlerFunc
func ParseTraceparent ¶
func RecoverAndExit ¶
func RecoverAndExit()
func RecoveryMiddleware ¶
func RecoveryMiddleware() gin.HandlerFunc
func TraceMiddleware ¶
func TraceMiddleware() gin.HandlerFunc
Types ¶
type Identity ¶
type LoggerConfig ¶
type LoggerConfig struct {
SkipPaths []string
}
type TraceContext ¶
func TraceFromContext ¶
func TraceFromContext(ctx context.Context) (TraceContext, bool)
Click to show internal directories.
Click to hide internal directories.