silverstripe / silverstripe-raygun

Raygun.com integration for PHP
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

Disable user tracking by default in RaygunClient #44

Closed ichaber closed 5 years ago

ichaber commented 5 years ago

This change allows to disable the user tracking in RaygunClient, which means no user information will be sent to Raygun (and therefore it will not report the affected users per error). This is to avoid setting a cookie on every instantiation and allow proper caching on a CDN level (performance).

In addition to that, Security::getCurrentUser is used instead of Member::getCurrentUser to avoid using deprecated methods.

sminnee commented 5 years ago

Question for @chillu @ichaber and others: once merged, should this by Raygun 2.3 or 3.0? I assume that changing the default behaviour here is a breaking change...

Doing a 3.0 release seems fine, it'll mean that users need to opt into it, which I guess is the point.

ichaber commented 5 years ago

It would probably be 3.0, if we change the disable_user_tracking configuration to true. With the current configuration it is not disabled by default.

If we want to make a release 2.3, we would need to change the configuration to false by default. As in:

Raygun4php\RaygunClient:
  disable_user_tracking: false

That however means that, there will still be a cookie set. Which do you prefer @sminnee or @chillu ?

sminnee commented 5 years ago

Let's go with a 3.0.

If someone is on 2.1 or 2.2 and wants this capability, it's probably easier to upgrade to ^3 than it is to manually apply the config. That's the benefit of a loosely coupled, single purpose module. ;)

ichaber commented 5 years ago

True that 👍. Sounds good to me. I'll create a 3.0 after that's merged.