goa
                                
                                 goa copied to clipboard
                                
                                    goa copied to clipboard
                            
                            
                            
                        Deprecated Code in Generated http.go using goa example
Description:
When generating the http.go file using the goa example command, the generated code includes a deprecated function httpmdlwr.RequestID. This leads to the following deprecation warning:
httpmdlwr.RequestID is deprecated: use OpenTelemetry instead, see for example github.com/goadesign/clue. This function will be removed in a future version of Goa.deprecated(default)
Problematic Code:
// Wrap the multiplexer with additional middlewares. Middlewares mounted
// here apply to all the service endpoints.
var handler http.Handler = mux
{
    handler = httpmdlwr.Log(adapter)(handler)
    handler = httpmdlwr.RequestID()(handler)
}
Suggested Fix:
It would be beneficial for the default example generation to utilize the clue package in place of the deprecated httpmdlwr.RequestID function. This aligns with current best practices and avoids the introduction of deprecated code in new projects.
Impact: This issue impacts new users or projects using Goa, as it introduces deprecated code right from the start, potentially leading to future compatibility issues.