Comments (12)
Hey there. Do you have anything for us to go on? An error message, logs etc.?
from sentry-dotnet.
Hello, there are no exceptions generated in the system. SentryId has a return value
from sentry-dotnet.
@xml1234 would it be possible to share a minimal reproducable example of the problem (e.g. as a GitHub project)?
from sentry-dotnet.
I have only added these few lines of code, and I will share them below. Sorry, I cannot upload the code because the network here does not allow
from sentry-dotnet.
protected void Application_Start()
{
#region Sentry
// Initialize Sentry to capture AppDomain unhandled exceptions and more.
SentrySdk.Init(o =>
{
o.AddAspNet();
o.Dsn = "";
// When configuring for the first time, to see what the SDK is doing:
o.Debug = true;
// Example sample rate for your transactions: captures 10% of transactions
o.TracesSampleRate = 1.0;
// If you also installed the Sentry.EntityFramework package
o.AddEntityFramework();
});
#endregion
try
{
throw new Exception("this is error");
}
catch (Exception err)
{
SentryId sentryId = SentrySdk.CaptureException(err);
}
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
from sentry-dotnet.
@xml1234 are you using the latest version of Sentry (3.36.0)?
from sentry-dotnet.
@jamescrosswell No, I'm using 3.34.0
from sentry-dotnet.
The same goes for (3.36.0)
from sentry-dotnet.
So I just tried to do this myself and, from the code you provide at least, it looks like you're missing quite a bit of the setup in your HttpApplication
class. Take a look at the Guide for ASP.NET - it has all this stuff in there as well:
// Global error catcher
protected void Application_Error() => Server.CaptureLastError();
protected void Application_BeginRequest()
{
Context.StartSentryTransaction();
}
protected void Application_EndRequest()
{
Context.FinishSentryTransaction();
}
protected void Application_End()
{
// Flushes out events before shutting down.
_sentry?.Dispose();
}
Let me know if that helps.
from sentry-dotnet.
@jamescrosswell I added these, but they didn't have any effect
from sentry-dotnet.
OK thanks @xml1234 ... I'm not able to reproduce any problems here. If there's any way you can provide a demo project that reproduces the problem, I can look into it further... otherwise it's hard to guess what might be going on.
from sentry-dotnet.
Closing this. There doesn't seem to be anything we can do right now.
Please feel free to reopen this issue with a repro.
from sentry-dotnet.
Related Issues (20)
- Source generators to maintain Bindable classes HOT 3
- Sentry not working on ASP.NET Core 6 HOT 6
- Android native crashes don't symbolicate - Upload native symbols via msbuild
- Feature: Bundle Replay worker in ASP.NET Core middleware
- Crash free rate is broken HOT 3
- Add `SentryOptions.AutoRegisterTracing` flag to options
- Sentry.Serilog throws if a DSN is not passed even though SentrySdk should already be initialized HOT 4
- Undo renaming of ISpan HOT 1
- Profiling logs warning in failing to process sample due to OOM
- Tests to ensure Bindable classes are consistent with Options classes
- Make SentryEvent.HasTerminalException() public HOT 5
- Add Metrics API HOT 6
- Simplify how users configure Sentry with Serilog HOT 4
- Remove SentrySinkExtensions.ConfigureSentrySerilogOptions
- FrameworkSupportsAot should only be set for .net8 and higher HOT 4
- Review projects that should target `net8.0` prior to release
- How to customise ASP.NET Core Grpc.Core.RpcException for correct Sentry issue tracking HOT 1
- Serilog API improvement ideas HOT 1
- 4.0 Beta 1: MAUI app crashes on Init on iPad Simular
- Include CPU and Memory info on profiles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-dotnet.