Perl Application Instrumentation with C SDK

Hello,
I am working on instrumenting a Perl application with C SDK , so that I could monitor key functionalities of the application in New Relic App.
I have installed C SDK on a Linux based system.
I am using Inline::C of Perl , and I have included the following in the perl files ;
use Inline C => Config => LIBS => ‘-L/home/sourav/NewRelic/c-sdk/libnewrelic.a’;
I have also tried by using the following :
use Inline C => Config => LIBS => ‘-L/home/sourav/NewRelic/c-sdk/include/libnewrelic.h’;

Makefile.PL is being generated without errors , as follows:

use ExtUtils::MakeMaker;
my %options = %{
{
‘VERSION’ => ‘0.00’,
‘LIBS’ => [
‘-L/home/sourav/NewRelic/c-sdk/libnewrelic.a’
],
‘TYPEMAPS’ => [
‘/usr/share/perl/5.18/ExtUtils/typemap’
],
‘INC’ => ‘-iquote"/home/sourav/betterknow/script" -iquote"/home/sourav/NewRelic/c-sdk/include"’,
‘NAME’ => ‘BetterKnow::Controller::Courses_4e3a’
}
};
WriteMakefile(%options);

I am still getting the following error :
"symbol lookup error: /home/sourav/betterknow/script/_Inline/lib/auto/BetterKnow/Controller/Courses_d38b/Courses_d38b.so: undefined symbol: newrelic_create_app_config."
On running the perl application , it is showing undefined symbols for the new relic APIs.

Am I missing something , Any help is appreciated.

Thanks in advance.

@sourav17.s Sorry you have been waiting awhile for a response from our community. I’m going to bring this back to the attention of our support team. Thanks for your patience!

Neal Mc

Hello,

Recently, I was able to connect to New Relic from my Perl application. Now, I a facing another issue.
I am getting the following error in c_sdk.log file ;

2020-12-18 12:38:05.424 +0000 (13787 13787) info: newrelic initialized
2020-12-18 12:38:05.425 +0000 (13787 13787) info: application BetterKnow connected
2020-12-18 12:38:10.429 +0000 (13787 13787) error: cannot end a segment on a different transaction to the one it was created on

I have written the following to end the transaction :

newrelic_end_segment(txn, &seg);
newrelic_end_transaction(&txn);

I am trying to use New Relic for using its APM features for our Perl application.
Would appreciate any help or information about intrumentation of Perl application with C.
Thank You.

@sourav17.s Looks like you resolved your original issue. Curious if you have reviewed these docs https://docs.newrelic.com/docs/agents/c-sdk Hoping that you will be able to find some helpful tips here since your specific Perl issues are stumping the community.