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

Gen 2 onCall handlers don't have traces #1487

Closed
ciriousjoker opened this issue Nov 14, 2023 · 3 comments · Fixed by #1491
Closed

Gen 2 onCall handlers don't have traces #1487

ciriousjoker opened this issue Nov 14, 2023 · 3 comments · Fixed by #1491
Assignees

Comments

@ciriousjoker
Copy link

Related issues

[REQUIRED] Version info

node: v16.19.0

firebase-functions: v4.5.0

firebase-tools: v12.7.0

firebase-admin: v11.11.0

[REQUIRED] Test case

import { onCall } from "firebase-functions/v2/https";

export const checkoutAddPaymentMethodPayPal = onCall(async (request) => {
  console.log("This should have a trace, but it does not.");
});

[REQUIRED] Steps to reproduce

  1. Deploy above code
  2. Check cloud function logs
  3. Try to view the logs from "same trace"

[REQUIRED] Expected behavior

Should have a trace.

[REQUIRED] Actual behavior

Doesn't, "same trace" is greyed out.

Were you able to successfully deploy your functions?

Yes, deployment works.


Related:

Reason for this is most likely, that unlike the onRequest function, the onCall handler isn't wrapped in wrapTraceContext().

@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.

@ciriousjoker ciriousjoker changed the title Gen 2 cloud functions don't have traces Gen 2 onCall handlers don't have traces Nov 14, 2023
@blidd-google blidd-google self-assigned this Nov 20, 2023
@joshgare
Copy link

Seeing the same issue, making debugging on stackdriver much more troublesome than V1 functions.

@blidd-google
Copy link
Contributor

Thanks for bringing this to our attention, PR is out that wraps onCall handlers with trace context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants