Skip to content

Conversation

hojgr
Copy link

@hojgr hojgr commented Jun 26, 2017

Hi! Awesome package!

But while implementing Sentry to my application I found it unreasonably difficult to assign user context to Sentry client - I'd have to deal with replacing Logger myself which compared to just putting three lines do config and one to middleware/presenter is just too inconvenient.

I changed the setUserContext method to be static and stored the instance to static variable to make it convenient. This is breaking change and will break every project that is extending the class or using it in a way not described in readme.

I was considering naming the method some other name, but it just didn't sit right with me. It will not even be that big of a breaking change considering the library has only 24 downloads so far.

Also, I didn't update the readme yet beacuse I was not sure if you would be interested in this change. If you would be interesetd, I'll update readme to highlight the new usage.

Kind regards
Michal Hojgr

@nofutur3
Copy link
Owner

Hi Michal!
Thanks for your feedback. I am not using user context so I have to study the problem, it will take me some time but I'll try to resolve it ASAP.

@nofutur3
Copy link
Owner

@hojgr Is there any particular reason why you need to access user context by static call? I have implemented another solution (now in dev-master) but I am still testing the feature.

@hojgr
Copy link
Author

hojgr commented Jul 24, 2017

Yes. The reason is in first paragraphs of the issue.

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

Successfully merging this pull request may close these issues.

2 participants