Skip to content

Conversation

aaron-steinfeld
Copy link
Contributor

Description

Two changes:

  1. Add a request ID first class field to the request context. This will be randomly initialized when creating a new tenant-based context, or can be set in manual context creation (such as in GQL). It will be propagated across services for correlation.
  2. Expose existing method to hydrate a request context object from metadata. This is purely a refactor, as it was previously part of the service interceptor, but this exposes it for custom server or client interceptors to use too.

@aaron-steinfeld aaron-steinfeld changed the title Request Add Request ID to RequestContext Sep 1, 2022
@github-actions

This comment has been minimized.

tim-mwangi
tim-mwangi previously approved these changes Sep 1, 2022
@github-actions

This comment has been minimized.

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #35 (4684107) into main (c7e058b) will increase coverage by 1.54%.
The diff coverage is 88.88%.

@@             Coverage Diff              @@
##               main      #35      +/-   ##
============================================
+ Coverage     70.47%   72.02%   +1.54%     
- Complexity      126      127       +1     
============================================
  Files            19       19              
  Lines           359      361       +2     
  Branches         22       22              
============================================
+ Hits            253      260       +7     
+ Misses           84       79       -5     
  Partials         22       22              
Flag Coverage Δ
unit 72.02% <88.88%> (+1.54%) ⬆️

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

Impacted Files Coverage Δ
...ore/grpcutils/context/RequestContextConstants.java 85.71% <ø> (+85.71%) ⬆️
...cutils/server/RequestContextServerInterceptor.java 0.00% <0.00%> (-78.95%) ⬇️
...ertrace/core/grpcutils/context/RequestContext.java 65.38% <94.11%> (+13.95%) ⬆️

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

@aaron-steinfeld aaron-steinfeld merged commit 577ab05 into main Sep 6, 2022
@aaron-steinfeld aaron-steinfeld deleted the request-id branch September 6, 2022 13:13
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

Unit Test Results

12 files   - 1  12 suites   - 1   15s ⏱️ -3s
62 tests ±0  62 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 577ab05. ± Comparison against base commit c7e058b.

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