Skip to content
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

All items created by RollbarMiddleware have the same title #650

Open
srmagura opened this issue Mar 19, 2024 · 1 comment
Open

All items created by RollbarMiddleware have the same title #650

srmagura opened this issue Mar 19, 2024 · 1 comment

Comments

@srmagura
Copy link

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):

  • Rollbar.NET Host type: ASP.NET Core
  • OS and its version: Windows 11
  • .NET flavor and its version: .NET 8
  • Application framework and its version: ASP.NET Core
  • Rollbar.NET Version: 5.2.0
  • Applicable Rollbar Plug-in (if any):
  • Applicable custom third party logging library/framework integration (if any):
  • Applicable Browser (if any):

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant