Last active
February 7, 2024 06:26
-
-
Save gistlyn/f83364c87717910ad4cd1b06bd2cb51f to your computer and use it in GitHub Desktop.
profiling
This file contains 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 RequestLogsFeature | |
{ | |
EnableResponseTracking = true, | |
}); | |
services.AddPlugin(new ProfilingFeature | |
{ | |
IncludeStackTrace = true, | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment