Skip to content
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: Report multiple query errors #4177

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Nov 30, 2024

Captures GraphQL error information as span events:
Screenshot 2025-01-17 at 3 59 23 PM

This is necessary because each query can have multiple errors (GraphQL spec for the "errors" field), which cannot reported using span tags (span tags only support one error per span).

Change log entry
GraphQL query errors are now reported as Span Events. This includes support for multiple errors, if present.

How to test the change?
All changes have unit tests and system-tests: DataDog/system-tests#3840

@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Nov 30, 2024
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 30, 2024

Datadog Report

Branch report: graphql-error-event
Commit report: a5b863e
Test service: dd-trace-rb

✅ 0 Failed, 22066 Passed, 1476 Skipped, 5m 30.76s Total Time

@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 98.36066% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.71%. Comparing base (3e81a5a) to head (a5b863e).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...cing/contrib/graphql/support/application_schema.rb 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4177      +/-   ##
==========================================
- Coverage   97.71%   97.71%   -0.01%     
==========================================
  Files        1358     1358              
  Lines       82501    82549      +48     
  Branches     4223     4226       +3     
==========================================
+ Hits        80618    80659      +41     
- Misses       1883     1890       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Nov 30, 2024

Benchmarks

Benchmark execution time: 2025-01-18 01:14:53

Comparing candidate commit a5b863e in PR branch graphql-error-event with baseline commit 3e81a5a in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@marcotc marcotc force-pushed the graphql-error-event branch from af565a0 to 10f8fe3 Compare January 17, 2025 23:32
@github-actions github-actions bot added the core Involves Datadog core libraries label Jan 17, 2025
@marcotc marcotc force-pushed the graphql-error-event branch from 10f8fe3 to 523aa51 Compare January 17, 2025 23:54
Copy link

github-actions bot commented Jan 17, 2025

👋 Hey @marcotc, please fill "Change log entry" section in the pull request description.

If changes need to be present in CHANGELOG.md you can state it this way

**Change log entry**

Yes. A brief summary to be placed into the CHANGELOG.md

(possible answers Yes/Yep/Yeah)

Or you can opt out like that

**Change log entry**

None.

(possible answers No/Nope/None)

Visited at: 2025-01-18 00:02:08 UTC

@marcotc marcotc force-pushed the graphql-error-event branch from 523aa51 to 418a657 Compare January 18, 2025 00:18
@@ -11,7 +11,7 @@ on:
env:
REGISTRY: ghcr.io
REPO: ghcr.io/datadog/dd-trace-rb
SYSTEM_TESTS_REF: main # This must always be set to `main` on dd-trace-rb's master branch
SYSTEM_TESTS_REF: marcotc/graphql-error-events # This must always be set to `main` on dd-trace-rb's master branch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: remove this before merging.
Leaving this here during code review because it proves that this PR passes system-test changes.

marcotc and others added 2 commits January 17, 2025 16:45
Co-authored-by: datadog-datadog-prod-us1[bot] <88084959+datadog-datadog-prod-us1[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants