package middleware import ( "github.com/gin-gonic/gin" "edge-infra.dev/pkg/lib/fog" ) // SetOperationInContext adds random operation id to context func SetOperationInContext() gin.HandlerFunc { return func(c *gin.Context) { ctx := fog.SetOperationContext(c.Request.Context()) c.Request = c.Request.WithContext(ctx) c.Next() } }