teamon/play-airbrake — pull request #6 by Enalmada (2012-10-25 21:48:28+00:00)
Title: Update src/main/scala/play/airbrake/Airbrake.scala

This would allow the java side to use the project in a similar way. I am sure it could be improved as I have little scala knowledge but it got me at least able to use AirBrake with java play so I figured I would submit it for those that want AirBrake java.

My global

@Override
public Result onError(RequestHeader request, Throwable t) {

// This is as close as I could come to having the same things as session data in scala due to my limited experience
Map data = new HashMap();
for (Entry value : request.headers().entrySet()) {
data.put(value.getKey(), Arrays.deepToString(value.getValue()));
}

Airbrake.notify(request.method(), request.uri(), data, t);
return super.onError(request, t);
}