Summary
There is currently no way to instrument custom segments within a PHP application. This feature is present in other New Relic agents, so it was surprising to me that this feature is absent.
Desired Behavior
I should be able to call, for example, newrelic_segment_start('example-segment');, run logic or call functions, and then call newrelic_segment_end(); and have this be displayed in the New Relic APM.
Possible Solution
I propose that newrelic_segment_start() and newrelic_segment_end() be implemented, adding this functionality.
Additional context
We have various complex logical processes in our application which would benefit from being able to categorise certain sets of logic under segments.
Summary
There is currently no way to instrument custom segments within a PHP application. This feature is present in other New Relic agents, so it was surprising to me that this feature is absent.
Desired Behavior
I should be able to call, for example,
newrelic_segment_start('example-segment');, run logic or call functions, and then callnewrelic_segment_end();and have this be displayed in the New Relic APM.Possible Solution
I propose that
newrelic_segment_start()andnewrelic_segment_end()be implemented, adding this functionality.Additional context
We have various complex logical processes in our application which would benefit from being able to categorise certain sets of logic under segments.