strawberry-graphql/strawberry

Opentelemetry creating one span per object

Opened this issue · 1 comments

Describe the Bug

When using opentelemetry strawberry extension, one span per returned sub-object seems to be created. It slows down considerably strawberry. Only a span for the top level object is necessary

System Information

  • Operating system:
  • Strawberry version (if applicable):

Additional Context

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

This is intended behavior - in some cases you want to instrument all of your resolvers to see how they're performing. However, we could extend the OTel support for finer granularity. Happy to accept any PRs on this 😊