Skip to content

Commit

Permalink
[apache#933] fix incorrect metric grpc_server_connection_number (apac…
Browse files Browse the repository at this point in the history
…he#934)

### What changes were proposed in this pull request?
Fix incorrect metric grpc_server_connection_number

### Why are the changes needed?
Fix: apache#933

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
Existing UT
  • Loading branch information
xianjingfeng authored Jun 8, 2023
1 parent cb22510 commit b6a725b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public Attributes transportReady(Attributes transportAttrs) {
}

public void transportTerminated(Attributes transportAttrs) {
grpcMetrics.decGauge(GRPC_SERVER_CONNECTION_NUMBER_KEY);
if (transportAttrs != null) {
grpcMetrics.decGauge(GRPC_SERVER_CONNECTION_NUMBER_KEY);
}
super.transportTerminated(transportAttrs);
}
}

0 comments on commit b6a725b

Please sign in to comment.