Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages include context as JSON string #7

Closed
tremby opened this issue Dec 7, 2016 · 2 comments
Closed

Messages include context as JSON string #7

tremby opened this issue Dec 7, 2016 · 2 comments

Comments

@tremby
Copy link
Contributor

tremby commented Dec 7, 2016

When I look at the submitted issues in the Sentry interface, they all have a JSON-encoded representation of the context data after the message, such as test warning {"user":{"id":1,"email":"test@example.com"}} []. This particular issue was logged with \Log::warning('test warning');, with context added via a processor. I get the same result if instead of the processor I add the context data as you do in the example in the readme.

If I look at the JSON submitted to Sentry I see that this JSON-encoded context data is present in the message string. It seems to me this should not be there.

@tremby
Copy link
Contributor Author

tremby commented Dec 7, 2016

It turns out the fix is simple -- it's just a matter of removing %context% %extra% from the format string in AbstractServiceProvider line 42. I could provide this as a pull request if you like? Or is this by design? If so, why?

@pulkitjalan
Copy link
Contributor

pulkitjalan commented Dec 8, 2016

This was originally copied from sentry ravens own example (before getsentry/sentry-laravel), but context and extra are added via the RavenHandler in monolog so its not required here. Removed it now and tagged a new release.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants