Gusto / apollo-federation-ruby

A Ruby implementation of Apollo Federation
MIT License
216 stars 76 forks source link

Tracing improvements #29

Open lennyburdette opened 5 years ago

lennyburdette commented 5 years ago

Tracking some feedback from Apollo on the java implementation that's also relevant to this implementation.

noaelad commented 5 years ago

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.

prikha commented 5 years ago

@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.