Skip to content
Snippets Groups Projects

graphqlbackend: only trace graphql queries

Merged Administrator requested to merge k/graphql-trace into main

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

Approval is optional

Merged by avatar (Jul 4, 2025 3:50pm UTC)

Merge details

  • Changes merged into main with b65ded88.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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

    I've heard a few people want this. I'm gonna land this since its early in the release cycle so we have time to revert if people find it frustrating.

  • 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 with net/trace. This would likely be a good balance between reducing spam and finding out why we are doing some DB call.

Please register or sign in to reply
Loading