Comments (5)
Great suggestion. I think we actually already have most of the necessary support for this on the server-side, so it's just a matter of implementing this in the gem. Making no changes to the existing server-side code, the following implementation is possible:
- a uuid will be generated when the payload is build
- the uuid will be saved to the request environment (or some other request-local storage)
- in your error pages, grab that uuid and show it to the user
- you can then visit
https://ratchet.io/item/uuid/?uuid=uuidgoeshere
, which will redirect you to the Item detail page for that item, orhttps://ratchet.io/instance/uuid/?uuid=uuidgoeshere
, which will redirect you to the Instance detail page for that instance.
How close is that to what you have in mind? Any improvements? I can think of a couple:
- more user-friendly identifiers (i.e. using a string of random words instead of a random 36-character string)
- automagically include the uuid in the default rails error template
Details about what already exists
The API currently supports a uuid
param as part of the item payloads. It's used by our Django and Pyramid libraries to include a "View in Ratchet" link in the development 500 error templates.
Uuids are 36-character strings that should be random and unique across the entire Ratchet system. In the Python libraries, we're using uuid.uuid4(). Looks like we can use @assaf's uuid gem here.
from rollbar-gem.
Awesome! Glad to see that there's already support for it on the SS. I was thinking about overriding the default 500 template as part of the gem, but one step at a time ..
from rollbar-gem.
Update on this... I've pushed a new version of the gem (0.5.1) that saves the exception uuid in env['ratchetio.exception_uuid']
. If you have custom error pages with e.g. Goalie, you can use it like so:
Please provide this error ID when contacting support: <%= request.env['ratchetio.exception_uuid'] %>
I wanted to start with this, but I suppose it would be possible to patch this into the default error pages. Would you want/use that?
from rollbar-gem.
Huh, hadn't heard of Goalie, will need to check it out.
Might give it a go - thanks for that. I think that providing the UUID and letting the user decide what to do with it is better than patching the default error pages.
from rollbar-gem.
Closing this out as it does exist, in the form described in the comment above. (The uuid is saved in env['rollbar.exception_uuid']
). We may make this fancier, but that can be a separate issue.
Thanks for the suggestion @mipearson!
from rollbar-gem.
Related Issues (20)
- Swallowing errors on Rails 7.1 HOT 9
- Load rollbar.min.js as local asset instead of CDN HOT 1
- Show request.body of GET request HOT 3
- Using rescue_from in ApplicationMailer has unexpected results under rails 6 and rollbar 3.4.0 HOT 2
- bug: intermittent ArgumentError from ignore_before_process on JRuby HOT 2
- Better DX for submitting dynamic custom data on automatically reported errors
- DEPRECATION: Sidekiq exception handlers now take three arguments HOT 3
- Deprecation warning in Rack 3 HOT 4
- Deployment notification error with capistrano HOT 4
- Full error reports do not show up in development env
- Multiple notifier and one Sidekiq worker HOT 1
- NameError: undefined local variable or method `arguments' for an instance of xxxMailer HOT 4
- `NameError: uninitialized constant Rollbar::ActiveJob` in `3.5.0`. HOT 1
- Rollbar.error has less context than uncaught exceptions HOT 3
- Release 3.5.2 to rubygems HOT 1
- Using ActiveSupport::ErrorReporter HOT 1
- Exception level filter not working for custom exception HOT 2
- Rollbar::Logger not working well with the newest logger gem
- Rollbar: Unexpected Rollbar.loadFull() called on a Notifier instance.
- Update rollbar.js to latest (from 2.26.1 to 2.26.4) HOT 1
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 rollbar-gem.