How to configure performance monitoring?
See original GitHub issueHi!
I am setting up performance tracing for our .NET projects and have configured SDK settings and am getting error tracebacks, but no performance monitoring data for transactions. We are running .NET Core 3.1 web application with REST API controllers. The SDK docs talk about TracesSampleRate
but setting it does not seem to affect the setup for SDK version 3.0.6
. On version 3.0.0-alpha.10
everything works as expected but that version seemed to collect everything by default if I recall correctly.
These are the documents I have been referencing:
- https://docs.sentry.io/platforms/dotnet/performance/
- https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/performance/
This is configuration I am using for testing in Program.cs
:
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Example
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((hostingContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((c, l) =>
{
l.AddConfiguration(c.Configuration);
// Adding Sentry integration to Microsoft.Extensions.Logging
// https://docs.sentry.io/platforms/dotnet/microsoft-extensions-logging/
l.AddSentry();
})
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
webBuilder.UseSentry();
});
}
}
And appsettings.json
:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Sentry": {
"Dsn": "https://abc@o123.ingest.sentry.io/456",
"TracesSampleRate": 1.0,
"SampleRate": 1.0,
"Debug": true,
"Environment": "local"
},
"AllowedHosts": "*"
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
To set up Business Central performance counters
Start Windows Performance Monitor. · In the navigation pane, expand Monitoring Tools, and then choose Performance Monitor. · In the console pane ...
Read more >Collect Data with Windows Performance Monitor
Step 1: Create a new data collector set · Click the Windows Start menu and search for "performance". · Right-click Performance Monitor and...
Read more >How to use Performance Monitor on Windows 10
Open Start, do a search for Performance Monitor, and click the result. · Use the Windows key + R keyboard shortcut to open...
Read more >How to use Performance Monitor in Windows 11/10
Press Win+F, type perfmon in the Search bar and hit Enter · Press Win+R, type perfmon in the Run box and hit Enter...
Read more >Gathering Windows Server Performance Monitor Information
On the Windows taskbar, select Start > Run. In the Run dialog box, type perfmon, and then click OK. In Performance Monitor: In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some docs landed for ASP.NET Core: https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/performance/included-instrumentation/
Thanks again for raising and keep the feedback coming 🙏
Makes sense, thanks @bruno-garcia!