-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL: Capture user-provided error extension values #4325
base: graphql-error-event
Are you sure you want to change the base?
Conversation
Thank you for updating Change log entry section 👏 Visited at: 2025-01-31 22:26:52 UTC |
Datadog ReportBranch report: ✅ 0 Failed, 22132 Passed, 1477 Skipped, 5m 39.79s Total Time ⌛ Performance Regressions vs Default Branch (1)
|
BenchmarksBenchmark execution time: 2025-01-31 22:30:13 Comparing candidate commit 1209efb in PR branch Found 2 performance improvements and 0 performance regressions! Performance is the same for 29 metrics, 2 unstable metrics. scenario:profiler - sample timeline=false
scenario:tracing - Propagation - Trace Context
|
2e6fa76
to
0c4de1a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## graphql-error-event #4325 +/- ##
=======================================================
+ Coverage 97.72% 97.73% +0.01%
=======================================================
Files 1368 1370 +2
Lines 83046 83127 +81
Branches 4222 4228 +6
=======================================================
+ Hits 81157 81245 +88
+ Misses 1889 1882 -7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with a minor update requested
@@ -883,6 +883,8 @@ The `instrument :graphql` method accepts the following parameters. Additional op | |||
| `with_unified_tracer` | `DD_TRACE_GRAPHQL_WITH_UNIFIED_TRACER` | `Bool` | (Recommended) Enable to instrument with `UnifiedTrace` tracer for `graphql` >= v2.2, **enabling support for Endpoints list** in the Service Catalog. `with_deprecated_tracer` has priority over this. Default is `false`, using `GraphQL::Tracing::DataDogTrace` instead | `false` | | |||
| `with_deprecated_tracer` | | `Bool` | Enable to instrument with deprecated `GraphQL::Tracing::DataDogTracing`. This has priority over `with_unified_tracer`. Default is `false`, using `GraphQL::Tracing::DataDogTrace` instead | `false` | | |||
| `service_name` | | `String` | Service name used for graphql instrumentation | `'ruby-graphql'` | | |||
| `error_extensions` | `DD_TRACE_GRAPHQL_ERROR_EXTENSIONS` | `Array` | List of extensions keys to include in the span event reported for GraphQL queries with errors. | `[]` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `error_extensions` | `DD_TRACE_GRAPHQL_ERROR_EXTENSIONS` | `Array` | List of extensions keys to include in the span event reported for GraphQL queries with errors. | `[]` | | |
| `error_extensions` | `DD_TRACE_GRAPHQL_ERROR_EXTENSIONS` | `Array` | List of extension keys to include in the span event reported for GraphQL queries with errors. | `[]` | |
A follow up from #4177, this PR allows users to capture custom error fields (called
extensions
in GraphQL).Here's an example of an error with
extensions
(link):extensions
can contain any arbitrary data, but are often important for error debugging.Because
extensions
can contain PII, or pretty much any arbitrary user-provided information, theextensions
that are allowed to be capture bydd-trace-rb
have to be added to a list in theDD_TRACE_GRAPHQL_ERROR_EXTENSIONS
configuration.Change log entry
No. This will be covered by #4177.
How to test the change?
All changes have automated tests.