You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(graphql): migrate shimmer to orchestrion instrumentation (#7757)
feat(graphql): migrate instrumentation to orchestrion
Migrates GraphQL instrumentation from shimmer wrappers to orchestrion AST rewriting for graphql execute / parse / validate entry points, including CJS and ESM paths for graphql >=0.10 and @graphql-tools/executor.
Moves resolver instrumentation into the GraphQL execute plugin. The execute plugin now owns per-execute root context, resolver wrapping, resolve-span lifecycle, source tracking, and resolver hook invocation. The old separate resolve plugin is removed.
Preserves and tests the existing cross-feature contracts:
- IAST still receives one apm:graphql:resolve:start publish per resolver call, using the actual GraphQL args object.
- AppSec still receives resolver payloads through datadog:graphql:resolver:start and can abort synchronously through the shared abort controller.
- depth only limits resolve-span creation; IAST/AppSec resolver publishes still happen for depth-gated fields.
- depth-gated resolvers now honor abort signals before falling through the no-span fast path.
- caller-owned execute args and contextValue are preserved without mutation.
- default field resolver behavior matches graphql for primitive parent values.
- graphql-yoga / @graphql-tools/executor execution is instrumented.
Adds public TypeScript declarations for the GraphQL resolve hook and FieldContext payload.
Keeps the implementation orchestrion-only, with no shimmer fallback, and updates the GraphQL long benchmark calibration for the migrated hot path.
Regression coverage was added for:
- resolver abort behavior past the configured depth
- depth: 0 AppSec resolver-channel publishing
- primitive-source defaultFieldResolver parity
- caller-supplied and frozen execute args
- primitive contextValue forwarding
- Yoga normalized executor instrumentation
- IAST/AppSec per-resolver channel cardinality
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
0 commit comments