Hello Everyone! Hope you all are good.
I’m developing a serverless custom app in freshsales suite and in there, I need to send logs to Google Cloud Logging, for this I’m using the Cloud Logging Library for Nodejs.
The issue is, to use this library outside of Google Cloud Plataform a need to use an API key (provided by GCP), that consists of a json file, in order authenticate the requests.
To inicialize the client I need to provide the API key path:
That variable filePath is defined as follows:
When I test locally, it works as expected, the logs are created, but when I deploy the app in the crm, the logs are not created in GCP, and the filePath returns /var/task/developer/server/lib/config/APIKEY.json
. This is probably not the right path to the file…
So, how can I access this file correctly in the serverless custom app?
Thanks!