rollbar / Rollbar.NET

Rollbar for .NET
https://docs.rollbar.com/docs/dotnet
MIT License
65 stars 44 forks source link

All items created by `RollbarMiddleware` have the same title #650

Open srmagura opened 3 months ago

srmagura commented 3 months ago

Describe the bug Whenever an exception is caught by RollbarMiddleware, it creates an item with the title "RollbarMiddleware processed uncaught exception."

image

This causes the dashboard to have many items with the same title, even when there are many different exceptions that have occurred in different parts of the codebase.

To Reproduce Throw an exception in an ASP.NET Core app, with the RollbarMiddleware configured.

Expected behavior I would like to see the original exception message in the title of the Rollbar item.

Rollbar Client - Rollbar.NET Hosting Environment (please complete the following information):

Additional context I know I can copy the RollbarMiddleware source code into my code to fix this, but ideally that would not be necessary.

srmagura commented 2 months ago

I worked around this limitation by creating my own Rollbar middleware, based on the official one: https://github.com/rollbar/Rollbar.NET/blob/master/Rollbar.NetCore.AspNet/RollbarMiddleware.cs

Delete the "title" argument from this line.