Code review comment for lp:~mars/launchpad/add-profiling-feature-flag

Revision history for this message
Robert Collins (lifeless) wrote :

Hi, we still need a config setting to control profiling because we do
not ever want it on in prod.

Here's what I think we need, for clarity:
C - config
F - flags
 - on prod
   C - allow_profiling False: no profiling, no how, no way
 - no devel
   C - allow_profiling true: profiling anytime
 - on staging
   C - allow_profiling True:
   F - profiling on request by developers [use a team scope to id the developer]
   F - profiling of all requests [use the default scope to turn it on
for all requests]

That is, the check for 'should we profile' is:
config.allow_profiling and getFeatureFlag('profile') == 'on'

-Rob

« Back to merge proposal