SAP-samples / btp-resource-consumption-monitor

Monitors the CPEA credit consumption of your global account and alerts on increased usage
Apache License 2.0
33 stars 9 forks source link

Highest credit forecast #24

Open ssharmasi opened 2 months ago

ssharmasi commented 2 months ago

Hi Team, we have implemented the monitoring solution and it was working fine as expected but today have noticed that the highest credit forecast and forecast breakdown are not getting displayed.Any thoughts? highest credit

willemi069808 commented 2 months ago

Hi @ssharmasi please contact me on teams/email (willem.pardaens -at- sap.com) to validate where the issue might be.

willemi069808 commented 2 months ago

This might be due to a timezone difference: the database query for the 'Highest Credit Forecasts' uses the CURRENT_DATE filter (see presentationService.cds#L235). The data in the application (which comes from the central BTP usage API) is using UTC timezone, so if you were to be (for example) in Sydney which is UTC+10, the first 10 hours of your day the query would filter on your new day, while the application still only has API data from your yesterday (which is still UTC's today).

For the application, you'd be living in the future :-) The exact timezone would depend on the datacenter where your HANA Cloud instance is deployed since this is a database filter. (other parts of the application might use a front-end date filter, which would then default to your browser/laptop's timezone..)

I always wondered what effect timezones would have on this application, so it would be good if we can do some tests together if this were to be the issue?

ssharmasi commented 1 month ago

sure thanks for the response i have sent you a mail to get on teams call to check the same.

willemi069808 commented 1 month ago

After our discussion: The identified root cause was probably a temporary issue with the data provider API of the application, and the problem resolved itself.

arunkrishnamoorthy commented 1 month ago

@willemi069808 I am facing the same issue. I don't see the data in the system, since October 1st.

arunkrishnamoorthy commented 1 month ago

The issue still exists.

image
willemi069808 commented 1 month ago

Monthly re-occurring issue. Will investigate.

willemi069808 commented 3 weeks ago

Data for October is available again since October 5th. A fix is still pending to avoid re-occurrence in November and December.