public TracingContext beginField(DataFetchingEnvironment dataFetchingEnvironment, boolean trivialDataFetcher) {
        if (!includeTrivialDataFetchers && trivialDataFetcher) {
            return () -> {
                // nothing to do
            };
        }
        long startFieldFetch = System.nanoTime();
        return () -> {
            long now = System.nanoTime();
            long duration = now - startFieldFetch;
            long startOffset = startFieldFetch - startRequestNanos;
            ExecutionStepInfo executionStepInfo = dataFetchingEnvironment.getExecutionStepInfo();

            Map<String, Object> fetchMap = new LinkedHashMap<>();
            fetchMap.put("path", executionStepInfo.getPath().toList());
            fetchMap.put("parentType", executionStepInfo.getParent().getUnwrappedNonNullType().getName());
            fetchMap.put("returnType", executionStepInfo.simplePrint());
            fetchMap.put("fieldName", executionStepInfo.getFieldDefinition().getName());
            fetchMap.put("startOffset", startOffset);
            fetchMap.put("duration", duration);

            fieldData.add(fetchMap);
        };
    }
public TracingContext beginField ( DataFetchingEnvironment dataFetchingEnvironment , boolean trivialDataFetcher ) { if ( ! includeTrivialDataFetchers && trivialDataFetcher ) { return ( ) -> { } ; } long startFieldFetch = System . nanoTime ( ) ; return ( ) -> { long now = System . nanoTime ( ) ; long duration = now - startFieldFetch ; long startOffset = startFieldFetch - startRequestNanos ; ExecutionStepInfo executionStepInfo = dataFetchingEnvironment . getExecutionStepInfo ( ) ; Map < String , Object > fetchMap = new LinkedHashMap < > ( ) ; fetchMap . put ( "path" , executionStepInfo . getPath ( ) . toList ( ) ) ; fetchMap . put ( "parentType" , executionStepInfo . getParent ( ) . getUnwrappedNonNullType ( ) . getName ( ) ) ; fetchMap . put ( "returnType" , executionStepInfo . simplePrint ( ) ) ; fetchMap . put ( "fieldName" , executionStepInfo . getFieldDefinition ( ) . getName ( ) ) ; fetchMap . put ( "startOffset" , startOffset ) ; fetchMap . put ( "duration" , duration ) ; fieldData . add ( fetchMap ) ; } ; }
This should be called to start the trace of a field, with {@link TracingContext#onEnd()} being called to
end the call.

@param dataFetchingEnvironment the data fetching that is occurring
@param trivialDataFetcher      if the data fetcher is considered trivial

@return a context to call end on