Disclaimer: I am a Java rather than a .NET developer, but have to tinker on a .NET integration component from time to time, so please bear with me.
We have some .NET components (.dll) that are invoked from a legacy COM application. It seems to me New Relic .NET Agent (6.1.48.0) is not able to automatically instrument these invocation. I’m therefore looking into explicitly triggering New Relic instrumentation from our .NET code.
For testing the set up I’m trying to start New Relic from a NUnit test case, which I believe may reflect the runtime environment challanges in that it is a non-IIS application and there is no app.config
(or can there be???).
In my global newrelic.config
I have
<service licenseKey="..." ssl="true" sendDataOnExit="true" />
I have tried with and without syncStartup="true"
and autoStart="false"
. All else is the default.
In my NUnit test case I have
NewRelic.Api.Agent.NewRelic.SetApplicationName("NUnit proof of concept"); // Tried without this
NewRelic.Api.Agent.NewRelic.StartAgent();
NewRelic.Api.Agent.NewRelic.SetTransactionName("Custom", "NUnit tx");
System.Threading.Thread.Sleep(61000); // Make sure application lives for 60 seconds
However no logs are created in my local Logs dir and no data turns up in the web UI.
I have read these two threads but nothing in there made any difference.
What am I doing wrong? Is what I’m trying to achieve at all possible?