middleware

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParentSpanID

func GetParentSpanID(ctx context.Context) string

GetParentSpanID retrieves the Parent Span ID from the context.

func GetSpanID

func GetSpanID(ctx context.Context) string

GetSpanID retrieves the Span ID from the context.

func GetTraceID

func GetTraceID(ctx context.Context) string

GetTraceID retrieves the Trace ID from the context.

func LoggingMiddleware

func LoggingMiddleware(log logger.Logger) gin.HandlerFunc

LoggingMiddleware logs request and response details. It uses the logger from the context if available, otherwise it requires a logger to be passed.

func TraceMiddleware

func TraceMiddleware(gen generator.TraceGenerator) gin.HandlerFunc

TraceMiddleware Add trace id when not found and context logger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL