Skip to content

Resolve NXCALS-4880 "Add tracing stats clientip to rest calls"

Merge request template

COMPATIBILITY NOTE

Please make sure that this change is BACKWARDS COMPATIBLE and a new server will work correctly with clients using old APIs versions.

It may be that data sent in the new format will break the old clients.

In case of any potential incompatibility we have to inform our clients and schedule release & deployment with them.


@acc-logging-team - please have a look for approval.

Adding tracing of calls for the meta-data api. This should go to the log/tracing.log file.

2021-05-21 13:26:11.926 [DEBUG] [https-jsse-nio-19093-exec-22] TracingRequestFilter - REQUEST [uri=/resources host=172.18.202.10 user=icsnxcals@CERN.CH payload={"systemName":"WINCCOA","variables":{"QRLAA_29R3_CV915.EVSTSREG01":false},"entities":[],"timeWindow":{"startTime":1621328400.000000000,"endTime":1621332000.000000000}}]
2021-05-21 13:26:11.973 [DEBUG] [https-jsse-nio-19093-exec-39] TracingRequestFilter - REQUEST [uri=/resources host=172.18.202.10 user=icsnxcals@CERN.CH payload={"systemName":"WINCCOA","variables":{"QSRB_4_TU4START.ONST":false},"entities":[],"timeWindow":{"startTime":1621346400.000000000,"endTime":1621350000.000000000}}]
2021-05-21 13:26:11.997 [DEBUG] [https-jsse-nio-19093-exec-6] TracingRequestFilter - REQUEST [uri=/resources host=172.18.202.10 user=icsnxcals@CERN.CH payload={"systemName":"WINCCOA","variables":{"LQATI_12R4_EH821_TS1.EVSTSREG01":false},"entities":[],"timeWindow":{"startTime":1621350000.000000000,"endTime":1621353600.000000000}}]
2021-05-21 13:26:12.080 [DEBUG] [https-jsse-nio-19093-exec-1] TracingRequestFilter - REQUEST [uri=/resources host=172.18.202.10 user=icsnxcals@CERN.CH payload={"systemName":"WINCCOA","variables":{"QUIC_4_3GL_HV790.EVSTSREG01":false},"entities":[],"timeWindow":{"startTime":1621360800.000000000,"endTime":1621364400.000000000}}]

The filter displays statistics every N seconds sorted by the biggest user:

2021-05-21 13:26:46.552 [DEBUG] [pool-2-thread-1] TracingRequestFilter - Top 100 access points with counts [[icsnxcals@172.18.202.10:/resources=924333, acclog@188.184.83.121:/resources=43763, acclog@188.
185.64.252:/resources=37199, acclog@188.185.79.125:/resources=25798, acclog@137.138.63.38:/resources=23420, acclog@137.138.153.4:/resources=22795, acclog@172.18.219.22:/resources=22478, acclog@172.18.219
.21:/resources=22476, acclog@172.18.219.20:/resources=22378, acclog@188.185.119.48:/resources=21173, acclog@137.138.63.36:/resources=17900, acclog@188.184.83.173:/resources=10490, radtest@188.184.80.59:/
resources=9958, rdenz@188.185.77.187:/resources=9318, pma@172.18.203.84:/resources=5627, accbpt@128.141.98.110:/resources=5213, vbaggiol@128.141.98.41:/resources=5158, pma@172.18.203.84:/variables/findAl
l=2516, acclog@137.138.121.10:/resources=2474, acclog@188.184.107.170:/entities/findAll=2418, fklumb@188.185.69.28:/resources=2186, acclog@137.138.154.176:/entities/findAll=1486, acclog@188.184.98.114:/e
ntities/findAll=1441, acclog@137.138.150.30:/entities/findAll=1421, acclog@137.138.77.10:/entities/findAll=1361, acclog@137.138.152.76:/entities/findAll=1305, acclog@188.184.103.69:/entities/findAll=850,
 scrivens@188.185.70.76:/variables/findAll=585, scrivens@188.185.70.76:/resources=507, copera@172.18.202.199:/resources=438, acclog@137.138.124.127:/entities/findAll=384, acclog@188.184.107.170:/entities
/update=373, aftserv@172.18.202.145:/resources=364, mpesoft@172.18.203.89:/resources=362, jjgras@128.141.98.101:/resources=316, acclog@137.138.148.17:/entities/findAll=239, kacperb@128.141.159.188:/resou
rces=235, copera@172.18.219.19:/resources=213, copera@172.18.219.22:/resources=212, copera@172.18.219.20:/resources=211, copera@172.18.219.21:/resources=211, acclog@137.138.77.10:/entities/update=202, ac
clog@137.138.154.176:/entities/update=188, aftserv@172.18.203.19:/resources=184, acclog@188.184.98.114:/entities/update=179, acclog@137.138.121.10:/variables/findAll=160, acclog@137.138.150.30:/entities/
update=159, acclog@137.138.152.76:/entities/update=146, acclog@188.184.98.98:/entities/findAll=133, acclog@188.184.103.49:/entities/findAll=133, icsnxcals@172.18.217.40:/entities/findAll=113, acclog@188.
184.83.121:/entities/findAllWithHistory=111, acclog@188.185.64.252:/entities/findAllWithHistory=105, copera@172.18.202.199:/variables/findAll=88, jspasic@188.184.38.69:/resources=83, cconfsrv@172.18.203.
158:/entities/findAll=64, vrude@172.18.203.19:/variables/findAll=60, icsnxcals@172.18.217.40:/variables/findAll=56, acclog@188.184.83.20:/entities/findAll=54, acclog@172.18.219.21:/partitions/findAll=51,
 acclog@172.18.219.22:/partitions/findAll=51, jjgras@128.141.98.101:/groups/findAll=49, acclog@172.18.219.20:/partitions/findAll=48, timoper@172.18.202.163:/entities/findAll=46, acclog@137.138.148.17:/en
tities/findAllWithHistory=37, egousiou@188.184.95.141:/resources=34, vrude@172.18.203.19:/resources=30, cconfsrv@172.18.203.158:/hierarchyVariables/findAllChangelogs=24, juang@188.184.38.69:/resources=20
, acclog@172.18.219.19:/partitions/findAll=17, zinur@188.184.38.38:/resources=16, fisiroky@188.184.38.70:/resources=16, jspasic@188.184.38.45:/resources=15, cconfsrv@172.18.203.158:/variables/findAllChan
gelogs=14, sdicarlo@188.184.38.38:/resources=14, cconfsrv@172.18.203.158:/entities/findAllChangelogs=14, pvantrap@188.185.126.192:/resources=13, erenner@172.18.203.19:/resources=13, sdicarlo@172.18.203.1
9:/variables/findAll=13, icsnxcals@172.18.217.40:/hierarchies/findAll=11, burbanie@172.18.203.19:/resources=10, daics@137.138.158.134:/resources=8, daics@188.185.87.38:/resources=6, mpebuilder@188.185.12
7.185:/resources=6, dash@137.138.124.52:/resources=6, mbengule@188.184.38.70:/resources=5, icsnxcals@172.18.217.40:/hierarchies/95270276/variables-ids=4, wuy@172.18.203.19:/resources=4, axbaxari@172.18.2
03.19:/resources=4, dash@188.185.91.58:/resources=4, axbaxari@172.18.203.19:/systems/findAll=3, acclog@188.184.83.20:/entities/findAllWithHistory=3, rkeijzer@172.18.203.19:/resources=3, axbaxari@172.18.2
03.19:/hierarchies/findAll=3, psbop@172.18.203.19:/hierarchies/findAll=2, acclog@137.138.63.38:/entities/findAllWithHistory=2, mpebuilder@188.185.127.185:/variables/findAll=2, fklumb@188.185.69.28:/varia
bles/findAll=2, psbop@172.18.203.19:/resources=2, dash@137.138.124.52:/systems/findAll=2]]

Closes NXCALS-4880

Edited by Jakub Wozniak

Merge request reports