Hi all,
For a requirement of the customer, we have a BS Rest api with a lot of methods, we need to get the IP of the caller, the method and what is the time that the API has taken to process.
I've found the event onPreDispatch where I can take the IP, ClassMethod, etc.. I'm using a global variable to save this information.
ClassMethod OnPreDispatch(pUrl As%String, pMethod As%String, ByRef pContinue As%Boolean) As%Status
{
set^CallApi($CLASSNAME(),$JOB,"url") = pUrl
set^CallApi($CLASSNAME(),$JOB,"method") = pMethod
set^CallApi($CLASSNAME(),$JOB,"Start") = $HOROLOGset^Call.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)

.png)
.png)