newrelic / go-agent

New Relic Go Agent
Apache License 2.0
763 stars 297 forks source link

conditional instrumentation and profiling options for server example #854

Closed nr-swilloughby closed 4 months ago

nr-swilloughby commented 6 months ago

I'm just going to park this here to discuss whether we want to include this in the agent.

This adds some compile-time flags for the server example app so you can easily build it with and without the agent, and with and without profiling. The default is the same as always (no profiling, yes agent). This may be of use for doing speed comparisons.

On the other hand, it does add some clutter to the code in the example app. The question is whether the benefit is worth the clutter.

nr-swilloughby commented 4 months ago

In the interest of keeping the code examples as clean and straightforward as possible, let's hold off on this for now.