mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
14.13.2013 7fc00840744292c3c138a7dffa187b073960e5a2
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, May 14, 2013 09:13 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, May 14, 2013 09:13 +0200
commit7fc00840744292c3c138a7dffa187b073960e5a2
tree 8181ef847636f30b7a5c71ae7e803764abb0334a tree | zip | gz
parent 1dab0872fc4a95c3ee2c4d9a173bb98ccf8d9e61 view | diff
OPENDJ-858 (CR-1680) Add stats tracking to HTTP client connections



Now monitoring total etime for each supported HTTP method.
While implementing this, I noticed that HTTPRequestInfo was duplicating fields in HTTPClientConnection and adding little more. I moved the missing data in HTTPRequestInfo to HTTPClientConnection and transformed the HTTPRequestInfo class into an interface to keep zero coupling between logging and HTTPClientConnection.



HTTPRequestInfo.java:
Transformed this class into an interface.
Renamed getRemoteHost() to getClientHost() and getRemoteAddress() to getClientAddress().

HTTPClientConnection.java
Now implements HTTPRequestInfo.
Moved several fields from HTTPRequestInfo here + added missing getters and setters.
In sendResponse(), calling HTTPStatistics.updateRequestMonitoringData().
Added log().

TextHTTPAccessLogPublisher.java:
Consequence of the changes to HTTPRequestInfo.
Also added support for the "c-port", "s-ip", "s-computername", and "s-port" fields.

CollectClientConnectionsFilter.java, SdkConnectionAdapter.java:
Consequence of the changes to HTTPRequestInfo.

HTTPStatistics.java:
Renamed instance members nbRequests to requestMethodsTotalCount and nbRequestsTotalCount to requestsTotalCount.
Added requestMethodsTotalTime instance member.
Completed the constructor, clearStatistics(), getMonitorData().
Fixed clearStatistics().
Added addAll(), updateRequestMonitoringData().

02-config.ldif:
Added attributes for monitoring the total etime of HTTP requests.
Renumbered some previously added attributes to follow what is done for LDAP operations etime.
7 files modified
436 ■■■■■ changed files
opends/resource/schema/02-config.ldif 52 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/loggers/HTTPRequestInfo.java 137 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/loggers/TextHTTPAccessLogPublisher.java 8 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilter.java 20 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/HTTPClientConnection.java 103 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/HTTPStatistics.java 104 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java 12 ●●●● diff | view | raw | blame | history