graphql-hive / graphql-hive/envelop

@envelop/opentelemetry: Support disabling `graphql.resolver.args` logging

Open
#2,895 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
827
Forks
132
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

While the `variables: false` option disables `graphql.execute.variables` logging, `graphql.resolver.args` is still unconditionally logged when `resolvers: true` is set. This means sensitive data passed as resolver arguments (e.g., mutation inputs) is recorded in spans even when users explicitly opt out of variable logging.

**Describe the solution you'd like**

When `variables` is false, `graphql.resolver.args` should also be omitted from resolver spans ([relevant code](https://github.com/graphql-hive/envelop/blob/0c3f7bc74a7f184ee8d52f269e00029b10deec3d/packages/plugins/opentelemetry/src/index.ts#L107)).

**Describe alternatives you've considered**

Add a resolverArgs option (similar to the existing variables option) to control whether `graphql.resolver.args` is recorded in resolver spans.

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.