You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
gobijan
changed the title
Make use of clue package for generated example to avoid deprecation warnings.
Deprecated Code in Generated http.go using goa example
Jan 17, 2024
Description:
When generating the
http.go
file using thegoa example
command, the generated code includes a deprecated functionhttpmdlwr.RequestID
. This leads to the following deprecation warning:Problematic Code:
Suggested Fix:
It would be beneficial for the default example generation to utilize the
clue
package in place of the deprecatedhttpmdlwr.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.
The text was updated successfully, but these errors were encountered: