The default GraphQL instrumentation from @opentelemetry/instrumentation-graphql supports a mergeItems option. It enables grouping all list items under a single span (like users.*.name) instead of having one span per list item (users.0.name, users.1.name, etc.).
Would it be possible to have such an option in @pothos/plugin-tracing? Either as a top-level, configure-once-for-all option (like the default instrumentation's option mentioned above), or even better, as a per-resolver option (which could enable business-related decisions for grouping, such as keeping unimportant list resolvers grouped, but splitting important ones where being able to examine each list item's resolver individually makes sense)?
Right now, I believe having each list item's resolver distinct from one another is the best default, but since large lists can generate quite a lot of spans, it would be nice to have the option to tone it down a notch. Managed OTel backends such as Sentry charge by the amount of spans generated, so this could be a nice way to reduce spans in non-critical spots.
The default GraphQL instrumentation from
@opentelemetry/instrumentation-graphqlsupports amergeItemsoption. It enables grouping all list items under a single span (likeusers.*.name) instead of having one span per list item (users.0.name,users.1.name, etc.).Would it be possible to have such an option in
@pothos/plugin-tracing? Either as a top-level, configure-once-for-all option (like the default instrumentation's option mentioned above), or even better, as a per-resolver option (which could enable business-related decisions for grouping, such as keeping unimportant list resolvers grouped, but splitting important ones where being able to examine each list item's resolver individually makes sense)?Right now, I believe having each list item's resolver distinct from one another is the best default, but since large lists can generate quite a lot of spans, it would be nice to have the option to tone it down a notch. Managed OTel backends such as Sentry charge by the amount of spans generated, so this could be a nice way to reduce spans in non-critical spots.