[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Functions v2 missing labels for documentOnwritten #1566

Open
jobweegink opened this issue May 16, 2024 · 3 comments
Open

Firebase Functions v2 missing labels for documentOnwritten #1566

jobweegink opened this issue May 16, 2024 · 3 comments

Comments

@jobweegink
Copy link

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

@google-oss-bot
Copy link
Collaborator

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

@exaby73
Copy link
exaby73 commented May 17, 2024

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

@exaby73 exaby73 added Needs: Author Feedback Issues awaiting author feedback and removed needs-triage labels May 17, 2024
@jobweegink
Copy link
Author
jobweegink commented May 17, 2024

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')
});

@google-oss-bot google-oss-bot added Needs: Attention and removed Needs: Author Feedback Issues awaiting author feedback labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants