Add gRPC middleware Context-aware interfaces#14525
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14525 +/- ##
==========================================
- Coverage 91.86% 91.85% -0.01%
==========================================
Files 677 677
Lines 42705 42723 +18
==========================================
+ Hits 39229 39244 +15
- Misses 2423 2425 +2
- Partials 1053 1054 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 32.68%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | HTTP/2.0,_client_per_thread_(like_single_app) |
1.1 ms | 1.6 ms | -32.68% |
Comparing jmacd:jmacd/middleware_context (f6dd450) with main (88735a1)
Footnotes
-
20 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
| // a remote source. | ||
| // | ||
| // This interface is consumed by configgrpc via configmiddleware. | ||
| type GRPCClientContext interface { |
There was a problem hiding this comment.
Should we deprecate the non-context and eventually remove since this is not a stable package?
There was a problem hiding this comment.
I assumed this was stable because configmiddleware was stabilized.
(How can extensionmiddleware not be stable if configmiddleware is?)
I would say yes, we can remove these if technically unstable. I was motivated to really understand how we add new extension APIs, and I think this also demonstrates that capability.
|
In favor of #14536 |
#### Description Specifies the mechanics of our approach to safe interface evolution. See open-telemetry#14523 See open-telemetry#14525 See open-telemetry#13902 #### Testing This pattern was "tested" in open-telemetry#13241 as I prototyped a rate-limiter extension. #### Documentation ✅ --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
Description
The gRPC middleware interface does not support initializing context-aware middleware. This requires a new method for both client and server.
Link to tracking issue
Fixes #14523
Testing
✅
Documentation
✅