Skip to content

Add DataLoader observability support #1034

Closed
@mmuth

Description

@mmuth

Feature Request
Hi there - I am currently migrating from graphql-kickstart to spring-graphql. The new observations in the GraphQlObservationInstrumentation are really great!

However I suffer from a huge amount of "noise spans" when using dataloaders, as the traces contain a Span for every resolved Child node (with an graphql.field.path in an array-like iteration /myfield/edges[x]). That means for a GQL request with a 5000 page size, 5000 spans are added even though only one single database request happens in the end and this is the interesting part to investigate on the resulting trace.

I'd propose that we can somehow recognize the "dataloaded fields" (e.g by attaching a graphql.datafetcher.completeablefuture=true KevValue as an extra highCardinalityKeyValue for each observation; or something similar), then one would be able to filter them later. To make this complete, an Observation for all called dataloaders would be very helpful.

Metadata

Metadata

Assignees

Labels

in: coreIssues related to config and core supporttype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions