I have a .net project that is using a really old Elastic.APM dll (version 1.2.0).
In this version, I was able to create transactions "manually" with a name and type defined by me.
But after the upgrade of DLL to the APM new version (1.16.1) the transaction isn't created anymore.
In the .net code, the transaction is created using:
_transaction = Agent.Tracer.StartTransaction(ssTransactionName, ssTransactionType);
Another issue that I noticed after the upgrade is that "Metrics" is not available on APM UI anymore. So I can have access to CPU and memory utilization:
In my app, I start by invoking the function MssInitialize and in some button clicks, I invoke the MssStartTransaction to create a new transaction.
These clicks invoke a query and because of these server actions, I expected to see some metrics of CPU/memory usage. But that information doesn't appear anymore on APM UI.
Could you maybe attach logs on trace level from when this happens?
if I call StartTransaction I get this errors:
Unfortunately I still don't see what the issue is.
Could you maybe attach a full agent log on Trace level? You can set ELASTIC_APM_LOG_LEVEL to trace and the agent will log more.
The NullReferenceException is definitely a useful pointer, but it's not enough. If there is a stacktrace on it, that'd help as well - but better would be a complete agent log on trace level.
I see how you start the transaction, a few questions to that:
Are those calls successful? Do you get back a real ITransaction instance? Or do those call return null?
You also stop those as well, right? (I guess you do, I'm asking just to be on the safe side, because I don't see calling ITransaction.End() on the screenshot).
The fact that you don't see metrics either is also a useful info, but without more logs I can't really see what's the issue is. With a full agent log we can maybe connect the two issues.
And one last idea: if you referenced an Elastic.Apm.* package in multiple libraries, please make sure all Elastic.Apm.* packages are on the same version (same minor and same patch level). We had some issues on this - I know this is not a very good update experience and we already look at how we can avoid this - but for now, all Elastic.Apm.* packages should be at the same version.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.