Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #218 +/- ##
=======================================
Coverage 62.59% 62.59%
=======================================
Files 18 18
Lines 262 262
=======================================
Hits 164 164
Misses 98 98 🚀 New features to boost your workflow:
|
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.
Summary
Adds TLS support and connection tuning options to the gRPC transport layer.
TLS
The gRPC client now automatically negotiates TLS based on the URI scheme. Connections to
https://endpoints use native system roots;http://connections remain plaintext. No config flag required — URI scheme drives the behavior.Connection options
GrpcConfiggains five new optional fields for fine-grained connection control:timeout_secsconnect_timeout_secskeep_alive_interval_secskeep_alive_timeout_secskeep_alive_while_idleAll fields are optional and default to the previous behavior (no timeouts, no keepalives).
Internal refactor
build_channelas a standalone async function — centralizes endpoint construction and TLS branching, removes duplication betweenGrpcClient::newandhealth_check.health_checknow reuses the existingChannelstored on the client instead of opening a new connection per call.Channelis stored onGrpcClientto support channel reuse across all service clients.Changes
crates/scouter_settings/src/grpc.rs— added five new fields toGrpcConfigand its constructorcrates/scouter_tonic/src/client.rs—build_channelfunction with TLS detection and connection option application;Channelstored on
GrpcClient;health_checkreuses stored channelpy-scouter/python/scouter/_scouter.pyi/stubs/scouter.pyi— updated stubs with newGrpcConfigfields and docstringsUsage