-
Notifications
You must be signed in to change notification settings - Fork 3.9k
plumb otel subchannel metrics disconnect error #12342
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
Open
AgraVator
wants to merge
24
commits into
grpc:master
Choose a base branch
from
AgraVator:plumb-otel-subchannel-metrics-disconnect-error
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
62d0969
master pull
AgraVator bf7255e
otel: plumb optional labels other than disconnect_error
AgraVator 57a7007
otel: fixes NPE
AgraVator 464bc68
otel: formatting fixes
AgraVator 65934ac
add test case
AgraVator c63405e
logs the metrics inside sync context
AgraVator d6bb6ec
reframe comments
AgraVator 9073cd4
suggested changes
AgraVator 5bde922
use parameterName
AgraVator c9f99c9
plumb disconnect error
AgraVator e78e690
master pull
AgraVator 1bc9f1a
fixes test cases
AgraVator 91997c9
fixes test cases
AgraVator add122f
fix test cases
AgraVator df736c2
fix test cases
AgraVator e6937b1
fix test cases
AgraVator 24af9ab
fix test cases
AgraVator 898351b
fix test cases
AgraVator 44fc3f9
suggested changes
AgraVator 8568964
fix tests
AgraVator 2c3b757
fix tests
AgraVator 3786365
fix tests
AgraVator feab3b8
fix tests
AgraVator 2ba576a
suggested changes
AgraVator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
34 changes: 0 additions & 34 deletions
34
core/src/main/java/io/grpc/internal/ClientTransportWithDisconnectReason.java
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,6 @@ | |
| import io.grpc.TlsChannelCredentials; | ||
| import io.grpc.internal.CertificateUtils; | ||
| import io.grpc.internal.ClientStreamListener.RpcProgress; | ||
| import io.grpc.internal.ClientTransportWithDisconnectReason; | ||
| import io.grpc.internal.ConnectionClientTransport; | ||
| import io.grpc.internal.DisconnectError; | ||
| import io.grpc.internal.GoAwayDisconnectError; | ||
|
|
@@ -133,7 +132,7 @@ | |
| * A okhttp-based {@link ConnectionClientTransport} implementation. | ||
| */ | ||
| class OkHttpClientTransport implements ConnectionClientTransport, TransportExceptionHandler, | ||
| OutboundFlowController.Transport, ClientTransportWithDisconnectReason { | ||
| OutboundFlowController.Transport, ClientKeepAlivePinger.TransportWithDisconnectReason { | ||
| private static final Map<ErrorCode, Status> ERROR_CODE_TO_STATUS = buildErrorCodeToStatusMap(); | ||
| private static final Logger log = Logger.getLogger(OkHttpClientTransport.class.getName()); | ||
| private static final String GRPC_ENABLE_PER_RPC_AUTHORITY_CHECK = | ||
|
|
@@ -999,6 +998,19 @@ public void shutdown(Status reason) { | |
| } | ||
| } | ||
|
|
||
| @Override | ||
| public void shutdown(Status reason, DisconnectError disconnectError) { | ||
| synchronized (lock) { | ||
| if (goAwayStatus != null) { | ||
| return; | ||
| } | ||
|
|
||
| goAwayStatus = reason; | ||
| listener.transportShutdown(goAwayStatus, disconnectError); | ||
| stopIfNecessary(); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public void shutdownNow(Status reason) { | ||
| shutdownNow(reason, SimpleDisconnectError.UNKNOWN); | ||
|
||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this method should just be
shutdown(reason, SimpleDisconnectError.SUBCHANNEL_SHUTDOWN). I don't know why it was made to have a duplicate.