Giter Site home page Giter Site logo

Comments (5)

brianr avatar brianr commented on June 30, 2024

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:

  1. a uuid will be generated when the payload is build
  2. the uuid will be saved to the request environment (or some other request-local storage)
  3. in your error pages, grab that uuid and show it to the user
  4. you can then visit https://ratchet.io/item/uuid/?uuid=uuidgoeshere, which will redirect you to the Item detail page for that item, or https://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.

mipearson avatar mipearson commented on June 30, 2024

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.

brianr avatar brianr commented on June 30, 2024

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.

mipearson avatar mipearson commented on June 30, 2024

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.

brianr avatar brianr commented on June 30, 2024

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)

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.