Elastic APM support for .net (MAUI) version 8

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.

Thanks.

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.

Thank you for your response.

IServiceCollection based mechanism would work, yes. Is there any estimate on when it could be implemented?

Manual instrumentation is not ideal as it sounds like I'd need to delegate logs and http requests myself.

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.

MAUI uses all the standard .net functionality - Microsoft.Extensions.Logging, Entity framework, etc.

My (questionable) assumption is that it 's enough to implement DI extensions.

Thank you for now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.