opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Utilize toolexec golang compiler switch

Open pdelewski opened this issue 2 years ago • 0 comments

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.

pdelewski avatar Jun 13 '23 08:06 pdelewski