Draft
Conversation
80f5c87 to
135f9f0
Compare
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3275 +/- ##
===========================================
- Coverage 71.62% 71.47% -0.15%
===========================================
Files 942 945 +3
Lines 34811 34872 +61
Branches 5899 5906 +7
===========================================
- Hits 24933 24924 -9
- Misses 8241 8288 +47
- Partials 1637 1660 +23
🚀 New features to boost your workflow:
|
dd8d47f to
dbfff5f
Compare
dbfff5f to
0395da9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
DatadogInterceptorforOkHttprequests.GraphQLExtractorwith 2 main functions:extractGraphQLAttributes(already existing logic, moved fromDatadogInterceptorfor better separation of concerns) &extractGraphQLErrors(new logic). This is a reusable extraction inrummodule that can be reused in the future with other networking libraries (no coupling with OkHttp).OkHttpGraphQLAdapterto encapsulate some already existing logic and delegate to the class above.StringExtoninternalmodule to reuseString.toBase64&String.fromBase64extension functions).Motivation
GraphQL APIs return HTTP 200 regardless of succeeding or not. Errors are reported inside the response body's
errorsarray rather than through HTTP status codes.Now these errors are properly caught, allowing customers to detect GraphQL failures that would otherwise go unnoticed.
Review checklist (to be filled by reviewers)