Request: Enable/Disable toggle
Closed this issue · 6 comments
erikaxel commented
Hi!
It would be great if it was possible in config to enable/disable query_track completely. I can think of several use cases:
- To easily enable/disable with ENV variables to turn it on/off without code push
- Have it on in just some prod environments
- Maybe even differ between dev/test/prod
WDYT?
kirillshevch commented
Hi @erikaxel
Thank you for an idea. I also thought about it but was not sure that someone would need it.
Without code change only one way that I see:
QueryTrack::Settings.configure do |config|
config.duration = 0.5
# ...
config.enabled = ENV['QUERY_TRACK_ENABLED']
end
So, when I have some free time I'll implement this.
erikaxel commented
Thanks for the feedback. I think the proposed solution seems ok to me actually, maybe that solution should be included in the readme?
kirillshevch commented
Yes, as soon as I implement it 🙂
kirillshevch commented
kirillshevch commented
erikaxel commented
Thank you!