-
Notifications
You must be signed in to change notification settings - Fork 375
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
[rails] Add feature flags to Rails integration #448
Conversation
Thinking about the scenario where a user only wants to turn off a single feature, would that mean they then have to list every other feature except the one they don't want? If that's the case, I'd suggest making the Also I might suggest renaming |
Thanks for looking at this @delner. For now since hashes are not merged in Options having the shorthand of enable if !configuration[:flags].has_key?(flag) || configuration[:flags][flag] |
Instead of extending setter, I've opted for option that doesn't require extending APIs |
e6c89b9
to
08fcdc6
Compare
Since we are introducing new API to allow more granularity when configuring integrations. Would you mind taking a second look @palazzem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look fine to me. Let's ask @palazzem to see what he thinks about adding this kind of option to the API.
@delner @pawelchcki I think it's great providing a fine-grain control on what integrations are enabled, considering we can keep reasonable defaults (so everything on by default). Two things I'm not sure are:
|
@palazzem I see, so options that are much more specific in name and purpose? I think that could make sense. Originally, I had suggested renaming it to |
action_view_rendering: true, | ||
action_controller_processing: true, | ||
active_support_caching: true, | ||
active_record: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, albeit requiring no change at all: this active_record
line is mean to enable/disable "sub-integrations" that the Rails meta-integration activates.
For what it's worth, I had started on changes to address exactly this kind of configuration setting in my configuration overhaul, which ultimately was meant to produce a new configuration API that resembles this prototype. The purpose of this is eerily similar to that.
@palazzem @pawelchcki Just wanted to get your opinion on this: how would you feel about bumping this to 0.13.0 (next week's release)? Or 0.14.0? My suggestion for doing so is that 1) this isn't really a bug fix in itself as it is a new feature, and 2) it would grant us an opportunity to reconcile the API changes in this PR with my already-written API changes suggested in this Gist and implemented in this branch. By reconciling these, we could avoid mutating the API too frequently and isolate the API changes to a single release (0.12.x --> 0.13.0) |
@delner agree. Let's bump the change to 0.13 if it's not required to address a specific issue. |
Okay. BTW, the aforementioned changes can be found in #450 and #451 . @pawelchcki Could you check those out, tell me what you think? They don't yet implement this specific change, but it would be easy to implement (see my sample code in #450 for an idea of what the API might look like). If you like what you see there, then we could rebase these changes on #451 and make it a part of that. |
Put aspects of Rails integration behind feature flags, allowing finetuning of provided tracing data depending on specific user needs.
flags
rails
instrumentation.{ instrument_action_view_rendering: true, instrument_action_controller_processing: true, instrument_active_support_caching: true, use_rack_integration: true, use_active_record_integration: true}