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
config/service/http_health_forwarder.go:157: cannot use __orchestrion_instrument.WrapHandlerFunc(func(w http.ResponseWriter, r *http.Request) {…}) (value of type "net/http".HandlerFunc) as handlerFunc value in return statement
Resolves#173, resolves#400
This PR changes `net/http` server-side instrumentation aspects to trace
the library itself (similar approach as we are doing today with the
client-side instrumentation). The hook where we inject is the
`http.Server.Serve` method, which should be the common method that is
always called when the http server is started (and at this point, the
Handler should already be set).
This fixes problems in the existing instrumentation where we:
- Don't trace custom `http.Handler` implementations
(#173).
- We double-trace `http.HandlerFunc(func(w http.ResponseWriter, r
*http.Request))` declarations.
- We might even break the build (as described in
#400).
- Patterns using assignment like `srv.Handler = myHandler` are not
traced.
As a side-effect, this approach removes the ability to use
`orchestrion:ignore` comments to skip tracing on http servers (which
happens for other aspects as well where we instrument the library code).
---------
Co-authored-by: Romain Marcadier <[email protected]>
Co-authored-by: Romain Marcadier <[email protected]>
Version of orchestrion
0.9.4
Describe what happened:
Received this build error:
function:
Describe what you expected:
A normal build execution
Steps to reproduce the issue:
Additional environment details (Version of Go, Operating System, etc.):
The text was updated successfully, but these errors were encountered: