Skip to content

Commit

Permalink
Merge pull request #3509 from slahirucd7/subOrgImpl
Browse files Browse the repository at this point in the history
Minor imprvements considering the logs relevant to the subscription rate-limiting
  • Loading branch information
slahirucd7 authored May 9, 2024
2 parents 453e2d6 + f431486 commit 71f1941
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adapter/internal/discovery/xds/marshaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,9 @@ func MarshalSubscriptionPolicyEventAndReturnList(policy *types.SubscriptionPolic
SubscriptionPolicyMap[policy.ID] = subPolicy
if eventType == UpdateEvent {
logger.LoggerInternalMsg.Infof("Subscription policy: %s is updated for organization: %s", subPolicy.Name, subPolicy.Organization)
} else {
logger.LoggerInternalMsg.Infof("Subscription policy: %s is added for organization: %s", subPolicy.Name, subPolicy.Organization)
}
logger.LoggerInternalMsg.Infof("Subscription policy: %s is added for organization: %s", subPolicy.Name, subPolicy.Organization)
}
return marshalSubscriptionPolicyMapToList(SubscriptionPolicyMap)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ public AuthenticationContext authenticate(RequestContext requestContext) throws
requestContext.addMetadataToMap("ratelimit:organization",
APIConstants.SUPER_TENANT_DOMAIN_NAME);
}
if (log.isDebugEnabled()) {
log.debug("Organization ID: " +
requestContext.getMetadataMap().get("ratelimit:organization")
+ ", SubscriptionId: " + subscriptionId + ", SubscriptionPolicy: " + subPolicyName
+ " will be evaluated for subscription rate-limiting");
}
}
return authenticationContext;
} else {
Expand Down

0 comments on commit 71f1941

Please sign in to comment.