From 9c143b1f68251bae8179a77ecc4be63bde80c17e Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 26 Jun 2026 12:12:53 +1200 Subject: [PATCH 1/2] docs(dotnet): clarify SQLClient instrumentation is unavailable on .NET Framework SqlClient's DiagnosticSource events aren't emitted on .NET Framework, so the SQLClient instrumentation in the Sentry.DiagnosticSource package has no effect there. On non-.NET Core targets that package only provides Entity Framework Core instrumentation. Co-Authored-By: Claude Opus 4.8 --- .../automatic-instrumentation-integrations/dotnet.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx b/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx index ce2c208798a05b..c7ba3f25fcfe0c 100644 --- a/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx +++ b/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx @@ -12,7 +12,7 @@ If you don't want to have this integration, you can disable it on `SentryOptions options.DisableDiagnosticSourceIntegration(); ``` -If your project doesn't match any of the conditions above, (for example, it targets .NET Framework 4.6.1 and uses only the `Sentry` package), you can still manually activate those instrumentations by including the package `Sentry.DiagnosticSource` and enabling it during on the SDK's initialization. +If your project doesn't match any of the conditions above, (for example, it targets .NET Framework 4.6.1 and uses only the `Sentry` package), you can still manually add Entity Framework Core instrumentation by including the package `Sentry.DiagnosticSource` and enabling it during the SDK's initialization. SQLClient instrumentation isn't available in this case — see the [SQLClient Integration](#sqlclient-integration) note below. ```csharp // Requires NuGet package: Sentry.DiagnosticSource @@ -52,6 +52,12 @@ The parameters for this span are: ### SQLClient Integration + + +SQLClient instrumentation is only available on .NET Core 3.0 or higher (for example, .NET 5+). SqlClient's `DiagnosticSource` events aren't emitted on .NET Framework, so this instrumentation has no effect there — even if you add the `Sentry.DiagnosticSource` package manually. On .NET Framework, only Entity Framework Core instrumentation is available through that package. + + + ![Sample transaction with SQLClient Integration.](./img/dotnet-sql-client-integration.png) This integration is part of the DiagnosticSource integration and will automatically create spans for SQLClient operations, the integrated operations are: From 1664ababb4b845c0e2d09129af286a82dab00c0b Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 26 Jun 2026 12:53:39 +1200 Subject: [PATCH 2/2] Apply suggestion from @jamescrosswell --- .../automatic-instrumentation-integrations/dotnet.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx b/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx index c7ba3f25fcfe0c..bdb57891b18cc3 100644 --- a/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx +++ b/platform-includes/performance/automatic-instrumentation-integrations/dotnet.mdx @@ -54,7 +54,7 @@ The parameters for this span are: -SQLClient instrumentation is only available on .NET Core 3.0 or higher (for example, .NET 5+). SqlClient's `DiagnosticSource` events aren't emitted on .NET Framework, so this instrumentation has no effect there — even if you add the `Sentry.DiagnosticSource` package manually. On .NET Framework, only Entity Framework Core instrumentation is available through that package. +SQLClient instrumentation is only available on .NET Core 3.0 or higher. SqlClient's `DiagnosticSource` events aren't emitted on .NET Framework, so this instrumentation has no effect there — even if you add the `Sentry.DiagnosticSource` package manually. On .NET Framework, only Entity Framework Core instrumentation is available via `Sentry.DiagnosticSource`.