Analytics & logging for cloud function API

69 views
Skip to first unread message

Parker Wightman

unread,
Oct 3, 2022, 8:09:01 PM10/3/22
to Firebase Google Group
Hello all,

We're beginning a migration of our cloud function API from a 1:1 mapping of cloud functions to URLs (which resulted in 100+ HTTPS functions) to a single (or a few) functions that handle everything. See related thread for context.

An issue we're concerned about is logging/metrics. Right now, we get a great breakout of per-function usage, logging, etc from Google Cloud Console. Example use case:

  1. Feature that calls cloud function is misbehaving in prod
  2. Open the log explorer in the cloud console
  3. Filter by function name (which cloud console lists for us, helpfully)
  4. Check for errors/warnings/etc emitted by function at relevant timestamp
By unifying everything under a single "API" function, we lose this granularity and all logs will be mixed together.

Does Google Cloud/Firebase have affordances for this? A way we could "tag" logs, for example, in a way that Google Cloud can interpret and provide filtering, outside of just a naive text filter of our own making? Any tips on making this easier?

Thanks,

Parker

Parker Wightman

unread,
Oct 5, 2022, 3:29:51 PM10/5/22
to Firebase Google Group
Looks like Cloud Run allows viewing/searching by URL pretty easily, so I think we might be good after all. So I think we're good!
Reply all
Reply to author
Forward
0 new messages