Tracing improvements
Tracking some feedback from Apollo on the java implementation that's also relevant to this implementation.
- [ ] Use
Base64.strict_encode64This leaves out newlines in the middle which aren't particularly helpful when encoded in a JSON string, and causes Node to have to use a slightly slower decode implementation.
- [x] Capture parse and validation errors and attach them to the root node
Adding some color on the second list item:
When following the current Readme instructions and enabling tracing, there are a couple of cases that result in the following error being raised, such as an invalid or unparsable query.
https://github.com/Gusto/apollo-federation-ruby/blob/57ecc5baff0d628e1b3f71161eb232fadbc05938/lib/apollo-federation/tracing.rb#L23
The error reads "... Add use ApollFederation::Tracing to your schema.", but this is not the root cause of the failure, rather it is the fact that trace[:start_time] isn't available because the query didn't execute fully. I'd ideally like to only raise that error if ApollFederation::Tracing isn't in the schema's tracers.
@noaelad @lennyburdette would you mind adding your setup of distributed tracing to the example, since for me even if the query is running well without it, with it I either have an error you mentioned or no tracing payload.