Skip to content

Conversation

nitrofski
Copy link

Which problem is this PR solving?

Fixes #1506.

Short description of the changes

Enable support for installing field instrumentation on union types.

The "type unwrap" logic was generalized to support unwrapping to a list of types. It is now a recursive function rather than a loop. The new unwrapping has been implemented in a way that is more agreeable to TypeScript.

@nitrofski nitrofski requested a review from a team as a code owner July 3, 2025 16:35
Copy link

linux-foundation-easycla bot commented Jul 3, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot requested a review from obecny July 3, 2025 16:35
@nitrofski nitrofski changed the title fix union types Enable union type support in @opentelemetry/instrumentation-graphql (#1506) Jul 3, 2025
@nitrofski nitrofski changed the title Enable union type support in @opentelemetry/instrumentation-graphql (#1506) fix: Enable union type support in @opentelemetry/instrumentation-graphql (#1506) Jul 3, 2025
@david-luna
Copy link
Contributor

Hi @nitrofski and thanks for your contribution.

I order to proceed we need a couple of things:

  • a recent PR which changes the folder structure has ben merged. Please sync your PR with the latest changes
  • you need to sing the CLA so we can run the CI

Cheers

@dyladan
Copy link
Member

dyladan commented Jul 9, 2025

@obecny can you please take a look at this?

@nitrofski
Copy link
Author

nitrofski commented Jul 9, 2025

@david-luna

I merged with main.

There are issues with CLA approval at my company at the moment, which we are working on getting resolved. I will sign as soon as that's done. Sorry for the delay.

@nitrofski
Copy link
Author

nitrofski commented Jul 10, 2025

CLA issues have been resolved.

@dyladan
Copy link
Member

dyladan commented Jul 16, 2025

@obecny can you please take a look at this?

@nitrofski
Copy link
Author

Good day,

This hasn't seen feedback in over a month. Is there anything I can do to help get attention on this PR?

Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.45%. Comparing base (9d689e1) to head (0c5ef73).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2923   +/-   ##
=======================================
  Coverage   91.44%   91.45%           
=======================================
  Files         146      146           
  Lines        8194     8202    +8     
  Branches     1846     1848    +2     
=======================================
+ Hits         7493     7501    +8     
  Misses        701      701           
Flag Coverage Δ
instrumentation-graphql 94.10% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/instrumentation-graphql/src/utils.ts 93.45% <100.00%> (+0.25%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL field instrumentation does not work for union return types
4 participants