Giter Club home page Giter Club logo

Comments (12)

bitsandfoxes avatar bitsandfoxes commented on June 12, 2024

Hey there. Do you have anything for us to go on? An error message, logs etc.?

from sentry-dotnet.

xml1234 avatar xml1234 commented on June 12, 2024

Hello, there are no exceptions generated in the system. SentryId has a return value

from sentry-dotnet.

jamescrosswell avatar jamescrosswell commented on June 12, 2024

@xml1234 would it be possible to share a minimal reproducable example of the problem (e.g. as a GitHub project)?

from sentry-dotnet.

xml1234 avatar xml1234 commented on June 12, 2024

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.

xml1234 avatar xml1234 commented on June 12, 2024
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.

jamescrosswell avatar jamescrosswell commented on June 12, 2024

@xml1234 are you using the latest version of Sentry (3.36.0)?

from sentry-dotnet.

xml1234 avatar xml1234 commented on June 12, 2024

@jamescrosswell No, I'm using 3.34.0

from sentry-dotnet.

xml1234 avatar xml1234 commented on June 12, 2024

The same goes for (3.36.0)

from sentry-dotnet.

jamescrosswell avatar jamescrosswell commented on June 12, 2024

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.

xml1234 avatar xml1234 commented on June 12, 2024

@jamescrosswell I added these, but they didn't have any effect

from sentry-dotnet.

jamescrosswell avatar jamescrosswell commented on June 12, 2024

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.

bitsandfoxes avatar bitsandfoxes commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.