firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

Missing traces in firebase functions using express, again

Open fgatti675 opened this issue 1 year ago • 11 comments

Related issues

https://github.com/firebase/firebase-functions/issues/1439 This issue is the orginal thread that was marked as solved, when it isn't. But please check it out to feel the growing frustration of many Google Cloud customers

[REQUIRED] Version info

I am going to skip the template because it is not meaningful.

The Google Cloud logging traces are gone. They were there in v1 functions. We complained that they were not there in v2. They were added after months. Now they are gone again, for reasons only you know.

Everyone is complaining in a ticket that was closed and is getting no attention from Google.

Everytime I need to check a log I end up very frustrated. All I need is to see all the logs from a single execution of my v2 express function (which magically gets converted into a Google Cloud run instance).

I think you are failing at hiding complexity away, and you are causing a lot of frustration to your customers.

And the most anoying thing is that this goes on for YEARS now, and no one seems to care or answer.

All I need is that when I receive a request, I can see all logs of the same trace. WE USED TO HAVE THIS. I have this instead, all logs are displayed with 0 tags, it is very hard to see what is going on in a single execution Screenshot 2024-10-08 at 16 33 11

Is this thing not bothering you at Google? Are you not using your own products? Please DO SOMETHING

fgatti675 avatar Oct 08 '24 14:10 fgatti675

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Oct 08 '24 14:10 google-oss-bot

Same issue

gbourne1 avatar Oct 21 '24 02:10 gbourne1

I was having the issue, and adding LOG_EXECUTION_ID=false to my env file resolved it, although I'm not sure of the potential knock-on effects of that (based on this comment: https://github.com/firebase/firebase-functions/issues/1439#issuecomment-2391623377)

gillycheesesteak avatar Nov 05 '24 19:11 gillycheesesteak

I was having the issue, and adding LOG_EXECUTION_ID=false to my env file resolved it, although I'm not sure of the potential knock-on effects of that (based on this comment: #1439 (comment))

Well nothing really, since according to the documentation of LOG_EXECUTION_ID, it's supposed to default to false anyway.

adamxi avatar Nov 05 '24 19:11 adamxi

On month after this ticket was opened (for a paid service) and no one from Google has said a word

fgatti675 avatar Nov 05 '24 22:11 fgatti675

Attached is an example of "out of memory" errors in v1 and v2 respectively:

image

It's pretty painful to debug v2 functions, of any kind. I'm considering downgrading to v1 again tbh.

larssn avatar Nov 07 '24 09:11 larssn

I hope I might be able to help here, in my case v2 functions logging works, i.e. I can see levels, traces, labels and structured data. It's not showing automatically like in case of v1 functions but when filtering by label.execution_id I get all the logs from a given execution. Perhaps is it because I import v1 logger?

screenshot_20241116_143105

Some details that perhaps will help you:

import { logger } from "firebase-functions/v1";
import { onRequest, onCall } from "firebase-functions/v2/https";


export const functionName =
    onCall(
        {
            minInstances: minInstancesConfig,
            maxInstances: 200,
            memory: "512MiB",
            concurrency: 120,
            timeoutSeconds: 120,
        }, async (req) => {
            const data = req.data;
            try {
                logger.info("Log content", { userId: data.userId, headers: req.rawRequest.headers });

...

Versions:

"firebase-functions": "^6.1.0"
"@firebase/logger": "0.4.2"

orestesgaolin avatar Nov 16 '24 13:11 orestesgaolin

Is there any news with this @CorieW?

daniseijo avatar Jan 21 '25 09:01 daniseijo

I was able to reproduce this. No labels are added to v2 logs.

CorieW avatar May 09 '25 12:05 CorieW

Can we expect this to be looked at before 2026? It's a pretty crucial piece of functionality.

larssn avatar Jun 10 '25 14:06 larssn

+1 on this please. This is critical for tracking requests

jedney0901 avatar Sep 26 '25 08:09 jedney0901