Skip to content

Gen 2 onCall handlers don't have traces #1487

Closed

Description

@ciriousjoker

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().

Activity

  1. google-oss-bot commented on Nov 14, 2023

    @google-oss-bot
    Collaborator

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

  2. changed the title [-]Gen 2 cloud functions don't have traces[/-] [+]Gen 2 onCall handlers don't have traces[/+] on Nov 14, 2023
  3. self-assigned this
    on Nov 20, 2023
  4. joshgare commented on Nov 20, 2023

    @joshgare

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

  5. blidd-google commented on Nov 28, 2023

    @blidd-google
    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址