Skip to content

Commit

Permalink
#659 - GRPC client log limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
tamkarcsi committed Jul 16, 2024
1 parent 32f7cb6 commit 6b19f3b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public class GrpcClientConfig implements IGrpcClientConfig {
public static final String MAX_INBOUND_METADATA_SIZE = "maxInboundMetadataSize";

/**
* gRPC client request log size in characters, default is 1000
* gRPC client request log maximum size in characters, default is 1000
*/
public static final String REQUEST_LOG_SIZE = "requestLogSize";

/**
* gRPC client response log size in characters, default is 1000
* gRPC client response log maximum size in characters, default is 1000
*/
public static final String RESPONSE_LOG_SIZE = "responseLogSize";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ public interface IGrpcClientConfig {
Integer getMaxInboundMetadataSize();

/**
* Gets the request log size
* Gets the request log maximum size
*
* @return the port
*/
Integer getRequestLogSize();

/**
* Gets the response log size
* Gets the response log maximum size
*
* @return the port
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public ClientRequestInterceptor() {
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {

ClientCall<ReqT, RespT> call = new SimpleForwardingClientCall<ReqT, RespT>(next.newCall(method, callOptions)) {

int logSize = 0;
int count = 0;

@Override
public void sendMessage(ReqT message) {
int requestLogSize = CDI.current().select(GrpcClientConfig.class).get().getRequestLogSize();
Expand Down
2 changes: 1 addition & 1 deletion docs/en/migration/migration270to280.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Changes are backwards compatible doesn't need any migration.
The `managed-executor-service` configuration is explained in the `coffee-grpc-server-extension` documentation.

** `GrpcClientConfig` extended with the `requestLogSize` and the `responseLogSize` parameter,
which serves to set the client request and response log size in characters,
which serves to set the client request and response maximum log size in characters,
the characters exceeding the limit will be truncated.

==== Migration
Expand Down
6 changes: 1 addition & 5 deletions docs/hu/migration/migration270to280.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,8 @@ A változtatások nem eredményeznek átállási munkálatokat, visszafelé komp
** Külön managed-executor-service használata (java /ee/concurrency/executor/grpc) a gRPC hívásokhoz.
A `managed-executor-service` konfigurációja a `coffee-grpc-server-extension` dokumentációban van bemutatva.

** `GrpcClientConfig` extended with the `requestLogSize` and the `responseLogSize` parameter,
which serves to set the client request and response log size in characters,
the characters exceeding the limit will be truncated.

** GrpcClientConfig kibővítve a requestLogSize és a responseLogSize paraméterekkel,
ezek a kliens kérés és válasz log méretének korlátozására szolgálnak karakterekben,
ezek a kliens kérés és válasz maximális log méretének korlátozására szolgálnak karakterekben,
a limit feletti karakterek levágásra kerülnek.

==== Átállás
Expand Down

0 comments on commit 6b19f3b

Please sign in to comment.