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

Firebase Functions v2 missing labels for documentOnwritten

Open jobweegink opened this issue 1 year ago • 4 comments

Related issues

#1331

[REQUIRED] Version info

**node:**20.11.1

**firebase-functions:**5.0.1

**firebase-tools:**13.5.2

**firebase-admin:**12.1.0

[REQUIRED] Test case

In a onDocumentWritten Cloud Function V2 in the logs panel when clicking "Show entries from this trace", only one log is shown.

[REQUIRED] Steps to reproduce

Deploy a onDocumentWritten Cloud function gen2, trigger it by changing a document in firestore. Go to logs Find the corresponding log click "Show entries from this trace"

[REQUIRED] Expected behavior

In Cloud function v1 it was very easy to group them by ExecutionID, this is no longer possible in V2 image Issue #1331 suggested "Show entries from this trace" howevert this is showing only that specific log, not all the other logs related to that execution

[REQUIRED] Actual behavior

Only one log is showing

Were you able to successfully deploy your functions?

Yes

jobweegink avatar May 16 '24 10:05 jobweegink

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar May 16 '24 10:05 google-oss-bot

Hey @jobweegink. Could you give a code sample which I can use to investigate and debug?

exaby73 avatar May 17 '24 06:05 exaby73

Sure, see below, the console logs 'hi' and 'there' wont be grouped when clicking "Show entries from this trace"

import {
  onDocumentWritten,
  Change,
  FirestoreEvent
} from "firebase-functions/v2/firestore";

exports.myfunction = onDocumentWritten("someCollection/{recordId}", (event) => {
  console.log('hi')
  console.log('there')
});

jobweegink avatar May 17 '24 08:05 jobweegink

This may be fixed by https://github.com/firebase/firebase-functions/pull/1533

exaby73 avatar Jul 15 '24 08:07 exaby73

Hi @jobweegink

Do you know whether this problem still exists in the latest version?

CorieW avatar Feb 20 '25 14:02 CorieW

Hey @jobweegink. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Mar 03 '25 02:03 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@jobweegink if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Mar 05 '25 02:03 google-oss-bot