opentelemetry-go-contrib
opentelemetry-go-contrib copied to clipboard
Utilize toolexec golang compiler switch
Problem Statement
Currently instrgen is a standalone tool. For this reason it contains a code for analyzing different packages/modules via golang.org/x/tools/go/packagesand requires more effort from user. This would not be needed withtoolexec switch.
Proposed Solution
toolexec is regular golang compiler switch. In this case invocation of instrgen would look like
go build -a -toolexec "instrgen" ./...
This would give us a way of intercepting all go files that are part of build process together with 3rd party and standard packages and as consequence reduce number of issues.