question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to configure performance monitoring?

See original GitHub issue

Hi!

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:

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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bruno-garciacommented, Feb 23, 2021

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 🙏

1reaction
aleksihaklicommented, Feb 17, 2021

Makes sense, thanks @bruno-garcia!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found