Skip to content

Commit

Permalink
Change the error log printing threshold to 0.80
Browse files Browse the repository at this point in the history
  • Loading branch information
VirajSalaka committed Oct 13, 2023
1 parent 096f972 commit d595885
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public void watchApis() {
public void onNext(DiscoveryResponse response) {
logger.info("API event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received API discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public void watchApplications() {
public void onNext(DiscoveryResponse response) {
logger.info("Application creation event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received Application discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public void watchApplicationKeyMappings() {
public void onNext(DiscoveryResponse response) {
logger.info("Application key generation event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received Application Key Mapping discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public void watchApplicationPolicies() {
public void onNext(DiscoveryResponse response) {
logger.info("Application policy event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received Application Policy discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public void watchKeyManagers() {
public void onNext(DiscoveryResponse response) {
logger.info("Key manager event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received KeyManagers discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public void watchRevokedTokens() {
public void onNext(DiscoveryResponse response) {
logger.info("Revoked token event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received revoked tokens response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public void watchSubscriptions() {
public void onNext(DiscoveryResponse response) {
logger.info("Subscription event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received Subscription discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public void watchSubscriptionPolicies() {
public void onNext(DiscoveryResponse response) {
logger.info("Subscription policy event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size for the type : " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size for the type : " +
response.getTypeUrl());
}
logger.debug("Received Subscription policy discovery response " + response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public void watchThrottleData() {
public void onNext(DiscoveryResponse response) {
logger.info("Throttle data event received with version : " + response.getVersionInfo() +
" and size(bytes) : " + response.getSerializedSize());
if ((double) response.getSerializedSize() / maxSize > 0.90) {
logger.error("Current response size exceeds 90% of the maximum message size " +
if ((double) response.getSerializedSize() / maxSize > 0.80) {
logger.error("Current response size exceeds 80% of the maximum message size " +
"for the type : " + response.getTypeUrl());
}
logger.debug("Received ThrottleData discovery response " + response);
Expand Down

0 comments on commit d595885

Please sign in to comment.