ctco/spring-boot-graphql-template

Query tracing

Closed this issue · 5 comments

Query tracing

Hi, what kind of tracing should be processed? Do we need to log it?
I have checked possibilities of graphql-java instrumentation and we can do following:
extend TracingInstrumentation and track "Begin" of execution/parse/validation/data fetch/field process (no endings here)
and we also have method instrumentExecutionResult that contains all metrics. start/end/total in general and for each field
P.S but this data can not be returned to client due to implementation of spring-boot ... they are simply ignored and not set in result.

Log, yes.
Base-line:
queryName
query
variables
Anything on top is optional

i have concerns regarding Query i have tried to print it one project with real query and...... it was a bit long (about 10000+ characters) log was spammed with it... (
should we truncate then ?

update: i guess we can log everything, and then people decide later what they want.

Don’t truncate anything what’s the point of traces if we lose information.

Also if your project has 10000+ character queries I’m not sure that long traces is your biggest problem. What’s up with that?!