graphqlbackend: only trace graphql queries
Created by: keegancsmith
Previously we would trace every graphql field as well. This lead to very large traces when returning search results. This is due to every results having multiple fields associated with it. The interesting information contained in the traces is our requests to databases/etc, while the field responsible for the request was largely noise. For large results this lead to it being impossible to load the Jaeger UI.
For example a search request on my localhost went from 161 spans to 37.
Co-Author: Stefan
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #12977 into main will not change coverage. The diff coverage is
n/a
.@@ Coverage Diff @@ ## main #12977 +/- ## ======================================= Coverage 51.18% 51.18% ======================================= Files 1470 1470 Lines 82576 82576 Branches 6795 6795 ======================================= Hits 42263 42263 Misses 36697 36697 Partials 3616 3616
Flag Coverage Δ #go 52.45% <0.00%> (ø)
#integration 24.59% <0.00%> (ø)
#storybook 14.85% <0.00%> (ø)
#typescript 47.68% <0.00%> (ø)
#unit 34.42% <0.00%> (ø)
Flags with carried forward coverage won't be shown. Click here to find out more.
Created by: keegancsmith
Just putting this thought down while it is in my head. If people do find this information missing, what we could do instead is annotate the
ctx
with the current graphql "path", then when creating a span we log that. This is similiar to what we do withnet/trace
. This would likely be a good balance between reducing spam and finding out why we are doing some DB call.