scout-apm-php icon indicating copy to clipboard operation
scout-apm-php copied to clipboard

Per-request partial instrumentation

Open andeewoodward opened this issue 3 years ago • 1 comments

Is it possible to manually load this package instead of it always autoloading? We would like to prevent it from loading in non-production environments and only load it a percentage of the time in production.

andeewoodward avatar Mar 29 '22 20:03 andeewoodward

@andeewoodward hey! Great suggestion. Out the box, there's nothing automatic to only enable on %age of requests, but you could simulate that by changing the monitoring enabled environment variable SCOUT_MONITOR flag to true/false per request. If this flag is false, Scout APM will return immediately.

It would be great if this could be baked into the library though, so it's something we could consider for a future release 👍

asgrim avatar Mar 29 '22 21:03 asgrim