Search code examples
firebasegoogle-cloud-functionsfirebase-hosting

Where can I see the log of urls which triggered a Cloud Function?


One of my functions sometimes returns an error status when invoked with a HTTP trigger. I see the function name and the error code in the Firebase function logs, but not the actual request which resulted in an error.

The function does dynamic url rewrites for a Firebase Hosting site, so it is invoked by Firebase hosting when the static rules don't match the incoming url.

Where can I see the log of the urls which triggered this rewrite function? I don't see it in the Logs Viewer (the function invocation time is there, just not the url).

Where else the url which actually invoked the function can be?


Solution

  • No such log exists (that is accessible to the developer). Firebase Hosting doesn't provide any request logging. You could put together something yourself by passing the original URL as a parameter to the function, the let the function log it.

    You are free to file a feature request with Firebase support if you like.