milgner / redmine_airbrake_server

A Redmine plugin which enables it to receive application error notifications Airbrake-style
28 stars 10 forks source link

Adding error-id to notice template #7

Closed mnemonikk closed 13 years ago

mnemonikk commented 13 years ago

The hoptoad notifier can display the error-id on the error page. You could use that to link back to the issue on redmine by including in your error template and setting config.user_information to something like "Please refer to #{{error_id}}".

If error-id is not set in the notice template, the hoptoad notifier will just leave alone.

milgner commented 13 years ago

Thanks for the information. But according to the documentation at http://help.airbrakeapp.com/kb/api-2/notifier-api-version-21, the tag should indeed be id instead of error-id. I'll check back with the thoughtbot developers...

mnemonikk commented 13 years ago

I just checked and the current HEAD of hoptoad_notifier seems to behave the same with regard to error-id, see https://github.com/thoughtbot/hoptoad_notifier/blob/master/lib/hoptoad_notifier/sender.rb#L58. I agree that it's a good idea to be conservative in what you send. Maybe it's really the hoptoad_notifier that should change here? Of course, what I'm really interested in is getting better bug reports, linking to tickets with a full stack trace.

milgner commented 13 years ago

Thanks for the link. With regards to the protocol specs, I'm fairly certain that the hoptoad_notifier would need to change. But it may be a bug in the documentation as well, so I sent a mail to the hoptoad_notifier developer mailing list. I'm not sure about this but I think that the official hoptoad_notifier as well as the Hoptoad (or rather Airbrake) app are both from the same people at Thoughtbot, so there's a good chance that someone there will have a definitive answer. Another possibility would be to include both error-id and id - one tag more shouldn't matter to a parser and that way everyone wins :)

milgner commented 13 years ago

There has been no activity on the notifiers dev mailing list for some time and it looks like my message is still awaiting moderation. So I decided to take the pragmatic approach: apply the patch and should the notifier ever change according to the specs, we can quickly change back, too.