apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

Consider false default for `fieldLevelInstrumentation` (version 4)

Open trevor-scheer opened this issue 3 years ago • 2 comments
trafficstars

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.

trevor-scheer avatar Jul 21 '22 17:07 trevor-scheer

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.

glasser avatar Jul 21 '22 18:07 glasser

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.

glasser avatar Jul 21 '22 18:07 glasser

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!).

glasser avatar Aug 26 '22 03:08 glasser

reopening until i delete that comment

glasser avatar Aug 26 '22 03:08 glasser

Finished up in #6855.

glasser avatar Aug 26 '22 18:08 glasser