jenssegers / laravel-rollbar

Rollbar error monitoring integration for Laravel projects
328 stars 98 forks source link

Unprocessed context data is now sent to Rollbar when exceptions are logged #37

Closed charles-rumley closed 8 years ago

charles-rumley commented 8 years ago

Fixes #36

jenssegers commented 8 years ago

Are you sure this works, I've been looking at the report_exception method in the original Rollbar client and it looks like it should be the third parameter rather than the second.

The second parameter $extra_data is passed to the exception trace builder, and not passed as context data. Or am I wrong?

I guess it should be:

$this->rollbar->report_exception($message, null, $context);
jenssegers commented 8 years ago

But then again, the second parameter for report_message is also $extra_data ...

charles-rumley commented 8 years ago

Hmm.. good call, report_exception and report_message handle $extra_data differently. Since information in $payload_data is merged and included, we could add context there, but I'm not sure if Rollbar expects arbitrary data in $payload_data. I'll give this a more thorough look and update the PR accordingly.

jenssegers commented 8 years ago

Great, thanks!

charles-rumley commented 8 years ago

As pointed out by @jenssegers and verified by further tests, $context should be passed as $payload_data rather than $extra_data.