Is there a way to visualise API calls in near/real time in BE so I can see which APIs are creating volume ? I could do this in browser developer tools, but might be a bit clunky ?
Which of the ‘API Calls’ contribute to the number in the ‘Performance’ tab for which the tier costs are calculated please ? I’m trying to understand which API calls I should be looking at that contribute to price spikes.
The correlation between the calls on the PERFORMANCE tab and those on the API CALLS tab is indirect. The former displays an aggregated number of calls per unit of time, while the latter shows all calls. The best way to correlate and identify the spikes is described in the following article:
Please share your application ID so we can take a look and possibly provide more guidance.
I did follow that article. I was hoping to correlate the API calls to the Performance chart, as I understand it is the ‘peak’ performance is what will contribute to pricing.
I ran a specific process in isolation and I can see from the API calls what is being called. But what I can’t clearly see is which of those calls are the most expensive and where I should concentrate on because perhaps I don’t have a baseline for what is ‘anticipated’ i.e. I know the logic of my code, but I don’t know what in that logic is contributing to the performance spikes. Hope that makes sense,
My application id is A603AF06-3DDD-6D47-FF01-D559C4DF9300.
About PERFORMANCE and API CALLS.
Tried to find out exactly which APIs When caused the peak performance in your app on 12/15/2023.
In API CALLS tab for 12/15/2023:
Local Service getCampaignEmailAddresses 30
getCampaignEmailAddresses =>
loop by suplierList
{
call to discoveryService->discoverEmailAddress
loop excludedEmailList
{
bulkUpdate
}
}
Local Service discoverEmailAddress 30
discoverEmailAddress =>
bulkUpdate
Data Service Update bulk 68
That is, you use a loop within a loop that calls the API CALL → this could potentially be the cause.
In methods getgoogleSearch, getEmailServer, sendEmails, getEmailTemplate, sendCampaign, createCampaignInstance, getEmailSMTPConfig or campaignSearch do you use loops in which there can be API CALLs?
User Service Get roles 365 - what actions in your app lead to the call Get roles - ?
File Service Download file 302 - what actions in your app lead to the call Download file - ?
Thanks Vladimir! Sorry for the delay in coming back. Hope you had a good festive break. This is very helpful.
So yes, there are loops within loops in getCampaignEmailAddresses - This is because for each supplier in supplierList, a page is searched for an email list by an external app when discoverEmailAddress is called. If I sent all the suppliers to the external app, the function would breach the 20 second process limit. So this was the only solution I could think of to return the call within 20 seconds, by processing each supplier, one at a time.
In those functions for ‘Update bulk’, these are run from the client in UI Builder. Mostly again because they run for a long time and I was getting time outs on the 20 second process limit. Some of those I could get once and story in memory.
Get Roles I think must be in something that gets triggered too often. I do not know what is downloading a file as I don’t need to download any files - that’s a strange one.
Thanks for looking into this, looks like I need some architectural changes.