apollo-server
apollo-server copied to clipboard
Consider false default for `fieldLevelInstrumentation` (version 4)
We should probably change the default for fieldLevelInstrumentation to return false instead of true, and I think @glasser agrees. https://github.com/apollographql/apollo-server/blob/db0dcaa3a01ed04559f36a506b8eb985137851c4/packages/server/src/plugin/usageReporting/options.ts#L57
Since trace data could then be unexpectedly missing, we can log a warning which leads to some documentation. The docs should explain how to get rid of the warning (by configuring it?), explain the performance characteristics, and suggest sane values for production.
Related: #6051
Doing that issue would not be quite as much as this, because having traces off but FLI on still gives you field execution statistics.
When we make this change, we should tweak the wording on studio-ui's FieldUsageStatBanner to not say that you have "disabled" this feature but just to say that it is not enabled.
In the interest of moving this project towards finished, let's leave the defaults for "send any traces?" and "instrument fields?" at turned on. The onboarding experience is better that way (ie, no changes needed to Studio UI) and if it's a performance problem you can tweak the settings (or move to Router if you're on Gateway!).
reopening until i delete that comment
Finished up in #6855.