orchestrion icon indicating copy to clipboard operation
orchestrion copied to clipboard

[BUG] Constructor instrumentation changes apparent type

Open RomainMuller opened this issue 1 year ago • 0 comments

Some constructor instrumentation functions return different types than the original calls, resulting in compilation errors when the result of the constructor function is assigned to an explicitly typed store, or if the implicitly typed variable is shared with another assignment of a value from the original type.

This is for example the case with gorilla/mux where mux.NewRouter is *mux.Router, but muxtrace.NewRouter returns *muxtrace.Router.

In order to fix this, the best strategy would be to migrate from call-site instrumentation to callee instrumentation, effectively modifying the original type & constructor as appropriate.

RomainMuller avatar Apr 16 '24 12:04 RomainMuller