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

chore: adding additional logs to get original request in case of failure #198

Closed
wants to merge 1 commit into from

Conversation

saxenakshitiz
Copy link
Contributor

No description provided.

@saxenakshitiz saxenakshitiz requested a review from a team as a code owner September 26, 2023 07:29
@github-actions
Copy link

Test Results

25 tests  ±0   25 ✔️ ±0   17s ⏱️ -5s
11 suites ±0     0 💤 ±0 
11 files   ±0     0 ±0 

Results for commit 5e45ae9. ± Comparison against base commit a98a91c.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #198 (5e45ae9) into main (3b8b494) will decrease coverage by 0.04%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main     #198      +/-   ##
============================================
- Coverage     21.99%   21.95%   -0.04%     
  Complexity       75       75              
============================================
  Files            69       69              
  Lines          1819     1822       +3     
  Branches         55       55              
============================================
  Hits            400      400              
- Misses         1410     1413       +3     
  Partials          9        9              
Flag Coverage Δ
unit 21.95% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ce/graphql/entity/dao/GatewayServiceEntityDao.java 0.00% <0.00%> (ø)
...raphql/explorer/dao/GatewayServiceExplorerDao.java 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -84,7 +84,8 @@ public Single<EntityResultSet> getEntities(EntityRequest request) {
return this.requestBuilder
.buildRequest(request)
.subscribeOn(this.boundedIoScheduler)
.flatMap(serverRequest -> this.fetchAndMapEntities(context, request, serverRequest));
.flatMap(serverRequest -> this.fetchAndMapEntities(context, request, serverRequest))
.doOnError(error -> log.error("Error while handling entities request {}", request, error));
Copy link
Contributor

Choose a reason for hiding this comment

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

Have GW handle this (if it throws, it should include the details of what failed as well as logging it locally). At this layer, the only relevant logging would be a debug log on a successful received response.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GW logs the request. However I am looking for original request received by the graphql.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense to log, but this isn't it - this is already an intermediate state, the result of the gql request processing. Ideally we should have the global gql error handler do such logging (we may need to do a bit of work to get to the initial request there).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Best to have a global error handler that logs original request on failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants