#Profiling doesn't seem to be collecting or sending any data

4 messages · Page 1 of 1 (latest)

quick apex
#

Hello,

I have a simple WPF desktop application (.NET 8) and I'm using Sentry.Profiling, which I initialize like this:

SentrySdk.Init(opts =>
{
    opts.Dsn = "<redacted>";
    opts.AutoSessionTracking = true;
    opts.IsGlobalModeEnabled = true;
    opts.StackTraceMode = StackTraceMode.Enhanced;
    opts.Debug = true;
    opts.TracesSampleRate = 1.0;
    opts.AddProfilingIntegration(new TimeSpan(1000));
    opts.ProfilesSampleRate = 1.0;
    opts.SendDefaultPii = true;
});

However after I run my app and use it for a bit (loading some data, etc), I never see any profiling data on the app.

I can manually capture messages and transactions (e.g. SentrySdk.StartTransaction) and this works fine, but ideally I'm trying to capture metrics on all methods without having to manually setup transactions on everything.

I'm not sure if this is an issue with my setup, or a fundamental misunderstanding of how this is meant to work?

EDIT:
I've got back to as simple as possible with:

SentrySdk.Init(opts =>
{
    opts.Dsn = "<redacted>";
    opts.Debug = true;
    opts.DiagnosticLogger = new TraceDiagnosticLogger(SentryLevel.Debug);
    opts.IsGlobalModeEnabled = true;
    opts.AddProfilingIntegration();
});

And I'm seeing the following in the debug output:

Debug: Registering integration: 'ProfilingIntegration'.
 Info: Profiling Integration is disabled because profiling is disabled by configuration.```

What configuration is this referring to? How do I change it so that it enables profiling?
quick apex
#

Okay, so it looks like my misunderstanding is that this is setting up profiling of transactions whereas I'm looking for continuous profiling. The documentation (https://docs.sentry.io/product/explore/profiling/transaction-vs-continuous-profiling/) is a bit vague and I had to hunt for this, but this page suggests the following:

The exact method-naming varies, but most SDKs that support continuous profiling now expose a top level Sentry.profiler that exposes a startProfiler and stopProfiler method. (Please see the SDK docs for exact definitions.)

We recommend that you call the startProfiler method right after the Sentry SDK is initialized so that you gain visibility at the earliest point in your application lifecycle. From then on, the profiler will keep collecting profiles and sending chunks to Sentry until stopProfiler is called.
However this does not exist in the .NET SDK, it seems like.

Would be good if this is correct and could be confirmed?

#

I'm not sure what "SDK docs for exact definitions" refers to here as I thought that page was the docs.

gusty timber
#

@quick apex That's correct - this is the list of supported SDKs for Continuous Profiling (toward the bottom of this page): https://docs.sentry.io/product/explore/profiling/getting-started/

We are incrementally adding support for continuous profiling in more of the SDKs this year but don't have a specific timeline for .NET yet. Thanks for the feedback, we could definitely make improvements to the docs to make all of this more clear!

Profiling transactions for .NET is supported as you saw, but that support is also experimental. What's your use case for continuous profiling over transaction based profiling?

Get started with Profiling, which allows you to see code-level profiling information for your Sentry apps.