Is it possible to use Elastic APM Agent in a .net MAUI application (android) for .net 8?
As far as I can tell only legacy IHostBuilder is suppored by APM nugets, which is no longer used since .net 6. Even worse, MAUI uses it's own MauiAppBuilder.
We don't have extension methods which would work here right now. I've updated an issue we have around adding an IServiceCollection based mechanism, which could also cover this use case.
I'm unfamiliar with Maui, and we haven't explicitly tested what does/doesn't work from an APM perspective when using the framework. You could try explicitly creating the agent via our public API which would enable APM. You would also likely need to manually instrument your code to start transactions for appropriate units of work.
I don't have an ETA for when we'll get this new extension in. My goal is to pick it up quite soon around some other priorities.
With Maui, you will need to (at least in the near term) start a transaction for your work in your code. Spans for HTTP, etc, will then be instrumented by our library. I've not looked into Maui enough to know if there are any natural hooks for us to create the top-level transactions automatically as we do for incoming HTTP requests, for example, in ASP.NET Core.
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.