Implement Elastic APM for WPF application

16 views Asked by At

I'm having trouble implementing APM into my WPF app. I got the code below from elastic website but I got error Startup not found: https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-dotnet-net-core.html

using Elastic.Apm.NetCoreAll;

namespace MyApplication
{
  public class Program
  {
    public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); })
            .UseAllElasticApm();

    public static void Main(string[] args) => CreateHostBuilder(args).Build().Run();
  }
}

Is there another way to set it up in WPF app?

0

There are 0 answers