Alt-NewRelic-Agent-FFI-Empty
view release on metacpan or search on metacpan
lib/NewRelic/Agent/FFI.pm view on Meta::CPAN
$agent->init;
my $txn_id = $agent->begin_transaction;
...
my $err_id = $agent->end_transaction($txn_id);
=head1 DESCRIPTION
B<NOTE>: This module is deprecated. It is based on the NewRelic Agent SDK, which was only
ever released as beta software. Please use L<NewFangle> instead.
This module provides bindings for the L<NewRelic|https://docs.newrelic.com/docs/agents/agent-sdk/getting-started/new-relic-agent-sdk> Agent SDK.
It is a drop in replacement for L<NewRelic::Agent> that is implemented using L<FFI::Platypus> instead of XS and C++. If you are writing
new code, then I highly recommend the procedural interface instead: L<NewRelic::Agent::FFI::Procedural>.
Why use L<NewRelic::Agent::FFI> module instead of L<NewRelic::Agent>?
=over 4
=item Powerful L<Alien> technology
lib/NewRelic/Agent/FFI.pm view on Meta::CPAN
L<a serious bug which will break when the install files are removed|https://github.com/aanari/NewRelic-Agent/issues/2>! You
can choose the version of the NR SDK that you want to use instead of relying on the maintainer of L<NewRelic::Agent> to do so.
=item Possible license issues
Related to the last point, the other module bundles the NR SDK, which may have legal risks (I am not a lawyer). In the very least
I think goes against the Open Source philosophy of CPAN.
=item No C++ compiler required!
Since this module is built with powerful FFI and Platypus technology, you don't need to build XS bindings for it. The
other module has its bindings written in C++, which is IMO unnecessary and doesn't add anything.
=item Tests!
The test suite for L<NewRelic::Agent> is IMO insufficient to have confidence in it, especially if the SDK needs to be upgraded.
This module comes with a number of tests that will at least make sure that the calls to NewRelic will not crash your application.
The live test can even be configured (not on by default) to send data to NR so that you can be sure it works.
=item Active Development
At least as of this writing, this module is being actively developed. The other module has a number of unanswered open issues,
lib/NewRelic/Agent/FFI/Procedural.pm view on Meta::CPAN
# use it:
my $tx = newrelic_transaction_begin;
...
my $rc = newrelic_transaction_end $tx;
=head1 DESCRIPTION
B<NOTE>: This module is deprecated. It is based on the NewRelic Agent SDK, which was only
ever released as beta software. Please use L<NewFangle> instead.
This module provides bindings for the L<NewRelic|https://docs.newrelic.com/docs/agents/agent-sdk/getting-started/new-relic-agent-sdk> Agent SDK.
Unlike L<NewRelic::Agent::FFI>, this is NOT a drop in replacement for L<NewRelic::Agent>. The author believes this interface is better.
In addition to the reasons the author believes L<NewRelic::Agent::FFI> to be better than L<NewRelic::Agent> (listed in the former's documentation),
the author believes this module to be better than L<NewRelic::Agent::FFI> because:
=over 4
=item Object oriented interface does represent or add anything
The L<NewRelic::Agent> instance that you create doesn't represent anything in the NewRelic Agent SDK. In fact if you don't understand
( run in 1.490 second using v1.01-cache-2.11-cpan-2398b32b56e )