-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add diagnostic source integration. #1154
Conversation
…y/sentry-dotnet into feat/efcore-performance
…y/sentry-dotnet into feat/efcore-performance
Codecov Report
@@ Coverage Diff @@
## main #1154 +/- ##
==========================================
- Coverage 80.62% 80.57% -0.06%
==========================================
Files 205 212 +7
Lines 6647 6846 +199
Branches 1508 1563 +55
==========================================
+ Hits 5359 5516 +157
- Misses 796 822 +26
- Partials 492 508 +16
Continue to review full report at Codecov.
|
test/Sentry.Diagnostics.DiagnosticSource.Tests/SentrySqlListenerTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick pass.
...agnostics.DiagnosticSource/Internals/DiagnosticSource/SentryDiagnosticListenerIntegration.cs
Show resolved
Hide resolved
src/Sentry.Diagnostics.DiagnosticSource/Sentry.Diagnostics.DiagnosticSource.csproj
Outdated
Show resolved
Hide resolved
src/Sentry.Extensions.Logging/Extensions/KeyValuePairExtensions.cs
Outdated
Show resolved
Hide resolved
test/Sentry.Diagnostics.DiagnosticSource.Tests/SentrySqlListenerTests.cs
Outdated
Show resolved
Hide resolved
Formatting fixes and negated logic on Sentry,csproj Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
|
...Sentry.Diagnostics.DiagnosticSource/Internals/DiagnosticSource/SentryDiagnosticSubscriber.cs
Show resolved
Hide resolved
...Sentry.Diagnostics.DiagnosticSource/Internals/DiagnosticSource/SentryDiagnosticSubscriber.cs
Outdated
Show resolved
Hide resolved
src/Sentry.Diagnostics.DiagnosticSource/Internals/DiagnosticSource/SentrySqlListener.cs
Show resolved
Hide resolved
...agnostics.DiagnosticSource/Internals/DiagnosticSource/SentryDiagnosticListenerIntegration.cs
Show resolved
Hide resolved
test/Sentry.Diagnostics.DiagnosticSource.Tests/Sentry.Diagnostics.DiagnosticSource.Tests.csproj
Outdated
Show resolved
Hide resolved
test/Sentry.Diagnostics.DiagnosticSource.Tests/Sentry.Diagnostics.DiagnosticSource.Tests.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
See #1150
This PR adds a new project called Sentry.Diagnostics.DiagnosticSource that implements the Diagnostic Source integration, integrating (for now) EF Core and SQLClient.
In addition, the main Sentry project will come with the same integration if the target version is .NET CORE 3.1 or newer.
EF Core
Adds automatic spans for EF Core queries.
It creates spans for measuring the time required to connect to the database, execute the query and optimize it.
If everything went well, the spans will receive the status OK, otherwise, an internal error.
samples
OK Request https://sentry.io/organizations/sentry-sdks/discover/sentry-dotnet:7a363753fbc6446ba983de5006bb5809
On error: https://sentry.io/organizations/sentry-sdks/discover/sentry-dotnet:8806f87262324b45aaf1a9a5fd851f29
Another case of error: https://sentry.io/organizations/sentry-sdks/discover/sentry-dotnet:6424aec6c1684f658144ee29f320f279
SQLClient
Adds automatic spans to any code that interacts with
https://www.nuget.org/packages/Microsoft.Data.SqlClient/
and
https://www.nuget.org/packages/System.Data.SqlClient.
The following Spans are created:
db.connection: measures the connection lifespan.
db.query: measures the time required to execute the query.