Hi @stefanmaric, you can’t currently see logs for a function that you trigger via a proxied address. We have an open issue to get this fixed but there are no solutions for it. You’ll have to trigger the function using it’s default address if you need logs for it.
In the specific project that started this thread it has to be proxied due to 〖aesthetics〗, since the feature involves passing links around in SMS messages and other chat systems.
I was able to find the bug in prod in spite of the lack of logs; so not in a hurry anymore.
But for sure would be nice to match the expectation of logs appearing every time the function is run, independent of how it was called.
Great feedback! We have a LOT of work to do on functions logs and we are working on a logging infrastructure for both that and builds right now, so here’s hoping we get down the list of issues to that one in the process
So glad to hear you got things sorted despite the missing logs!
Any update on this @fool? I’ve only just found this topic, as I assumed my logs were just not being very consistent à la Function logs are inconsistent in the Netlify Dashboard - #13 by GioFic95 but yeah, I’m actually getting both of these effect - when I was talking directly to my function it was only logging some lines, and now I’m in prod with the redirect I get no logs. That’s pretty awful.
Now I know we get 125k invocations/100h for free so I can’t really complain, but yikes, if we were paying for these functions, I’d certainly be expecting logs to work!
As I mentioned to you in your other thread, we still have no intention of supporting being proxy’d to in this way, so nope, no news. I really will post a followup in this thread in case things change
Sorry, I should have been clearer: We don’t support being proxy’d to from OTHER SERVICES which is what I was describing as “in this way” since you already heard a mouthful in the other thread and I wasn’t planning to belabor it further.
Internal 200 rewrites, or proxying between Netlify sites in the same account (note that we do NOT allow proxying between accounts) are both fine, though both will likely prevent the logs you are hoping to see.
Okay cool, let’s separate this out then. For this issue, I’m talking from a position of someone who is not proxying from another service - I am just using netlify.toml redirects/rewrites so I don’t have the /.netlify/functions/ in the URLs, and my logging doesn’t work.
(Because, even though I am proxying from CloudFront on a given non-Netlify-domain URL, when I go to the actual Netlify URL I still don’t see function logs, so we can say that, for now, this has nothing to do with proxying from an external service. Of course, this might eventually be an additional use-case to add to this logging issue, but isn’t something we have to worry about until the internal-redirects logging issue itself is resolved.)
OK, let me try saying this in a different way, Alex
We do not provide technical support, or recommend that you proxy to us from another service such as cloudflare, cloudfront, your own server, google, or anywhere on the internet.
Just wanted to say that I believe that proxy’d function logs should work better now. If anyone in this thread is using that functionality and can confirm/deny, that would be great! My test worked, but it is a toy app and your production use cases will be more interesting, methinks