zombocom/rack-timeout

Rollbar module broken

stevenjonescgm opened this issue · 9 comments

Rollbar updated Rollbar::Notifier.build_payload to Rollbar::Notifier.build_item in version 2.11.0 about April 2016. rollbar/rollbar-gem@d1ef431

Rollbar gem is now up to version 2.15.5, and the recommend way to manage custom fingerprinting is in the Rollbar server configuration <your-project-url>/settings/custom_fingerprinting

https://rollbar.com/docs/custom-grouping/

There are probably better definitions, but I'm starting with

[
  {
    "condition": {
      "eq": "Rack::Timeout::RequestTimeoutException", 
      "path": "body.trace.exception.class"
    }, 
    "fingerprint": "RackTimeout {{context}}", 
    "title": "RackTimeout {{context}}"
   }
]

which groups/titles by Rails controller#action for me. I'm sure I'll update my configuration or application code to get a meaningful {{context}} for workers and other proceses

Hi there, I was also confused by this when I found out that the Rollbar module is broken. The custom fingerprint is working nicely for my application.

That being said, are there any plans to support it again? Or to remove it from the project? Either way, I'd be happy to send a PR.

A PR would be much appreciated!

Hey @wuputah, should I make a PR removing the rollbar module? Or making it work again?

It's nice to have it working out of the box. But custom fingerprinting on Rollbar fixes the issue from their side.

🤔 wdyt?

Hmm, based on what you've posted, it sounds like it should be removed, and instead have a suggested custom fingerprinting settings and associated instructions. Maybe something like doc/rollbar.md rather than adding it to the (already very long) README (portions of which could be moved into doc as well).

For what it's worth - unfortunately this project doesn't have an active maintainer at the moment; I'm happy to continue shepherding it as best I can, though.

@andrehjr I'm currently using this custom fingerprinting

[
  {
    "condition": {
      "any": [
        {
          "eq": "Rack::Timeout::RequestTimeoutException", 
          "path": "body.trace.exception.class"
        }, 
        {
          "eq": "Rack::Timeout::RequestTimeoutException", 
          "path": "body.trace_chain.0.exception.class"
        }
      ]
    }, 
    "fingerprint": "RackTimeout {{context}}", 
    "title": "RackTimeout {{context}}"
  }, 
  {
    "condition": {
      "any": [
        {
          "eq": "Faraday::TimeoutError", 
          "path": "body.trace.exception.class"
        }, 
        {
          "eq": "Faraday::TimeoutError", 
          "path": "body.trace_chain.0.exception.class"
        }
      ]
    }, 
    "fingerprint": "FaradayTimeout {{context}}", 
    "title": "FaradayTimeout {{context}}"
  }, 
  {
    "condition": {
      "eq": "Timeout::Error", 
      "path": "body.trace.exception.class"
    }, 
    "fingerprint": "timeout-error", 
    "title": "Timeout Error"
  }
]

the extra any ... trace_chain.0 handles the case of wrapped exceptions. I should probably have a similar construct for Timeout::Error as well

@stevenjonescgm Brian from Rollbar here... how can we help?

The custom fingerprinting you posted above looks right (to account for the body.trace_chain structure as well as body.trace). One improvement would be to change that to body.trace_chain.*.exception.class.

Hi @brianr

Regarding this situation, what would you suggest? Reimplement the custom firgerprinting from inside this gem. https://github.com/heroku/rack-timeout/blob/master/lib/rack/timeout/rollbar.rb

Or recommend using the Custom Fingerprinting setting?

@rokob said in rollbar/rollbar-gem#709
I would advise that gem to stop monkey patching Rollbar for the custom fingerprinting and instead just advise via the docs on a custom fingerprint to add via the Rollbar UI.

Resolved by #124, thanks @andrehjr !