Last active
September 9, 2024 07:58
-
-
Save gistlyn/f83364c87717910ad4cd1b06bd2cb51f to your computer and use it in GitHub Desktop.
profiling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ServiceStack; | |
[assembly: HostingStartup(typeof(MyApp.ConfigureProfiling))] | |
namespace MyApp; | |
public class ConfigureProfiling : IHostingStartup | |
{ | |
public void Configure(IWebHostBuilder builder) => builder | |
.ConfigureServices((context, services) => { | |
if (context.HostingEnvironment.IsDevelopment()) | |
{ | |
services.AddPlugin(new ProfilingFeature | |
{ | |
IncludeStackTrace = true, | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment