Skip to content

Commit

Permalink
Merge pull request #12296 from msm1992/master-api-manager-2504
Browse files Browse the repository at this point in the history
Add userIP to faulty event
  • Loading branch information
tharikaGitHub authored Mar 20, 2024
2 parents f11b830 + 0e012fb commit 196842d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,17 @@ private Event getFaultyEvent() throws DataNotFoundException {
Target target = new Target();
target.setTargetResponseCode(Constants.UNKNOWN_INT_VALUE);
MetaInfo metaInfo = provider.getMetaInfo();
String userIp = provider.getEndUserIP();
if (userIp == null) {
userIp = Constants.UNKNOWN_VALUE;
}

event.setApi(api);
event.setTarget(target);
event.setProxyResponseCode(provider.getProxyResponseCode());
event.setRequestTimestamp(offsetDateTime);
event.setMetaInfo(metaInfo);
event.setUserIp(userIp);

return event;
}
Expand Down

0 comments on commit 196842d

Please sign in to comment.