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

Labels not applied to Cloud Run services - difficult to monitor costs #7850

Open
Desno365 opened this issue Oct 19, 2024 · 1 comment
Open

Comments

@Desno365
Copy link

[REQUIRED] Environment info

firebase-tools: 13.22.1

Platform: macOS

[REQUIRED] Test case

If you deploy a V2 function with custom labels, labels are not applied to the Cloud Run service, making it difficult to monitor the costs associated with the service.

A simple test case is the following:

const { onRequest } = require("firebase-functions/v2/https");

exports.hello = onRequest(
  { labels: { "cost_center": "sales" } },
  (req, res) => {
    res.status(200).send("Hello world!");
  }
);

[REQUIRED] Steps to reproduce

  1. Deploy any V2 function with custom labels
  2. Check on https://console.cloud.google.com/run the labels associated with the service
  3. Custom labels are not applied to the service

[REQUIRED] Expected behavior

Labels should be applied to the Cloud Run service so that costs associated with the service can be monitored.

[REQUIRED] Actual behavior

No labels are applied to the Cloud Run service.
Screenshot 2024-10-19 at 11 01 55

@colerogers
Copy link
Contributor

Hi @Desno365, thanks for opening this issue. As you've probably noticed, labels only show up on the Cloud Function interface/tab when deploying to Google Cloud Functions. I did some digging on our end and it looks like this feature has been requested internally for Cloud Functions to automatically propagate user-defined labels to Cloud Run. This is currently being worked on by the team and should be released on the backend so you won't need to upgrade firebase-tools or firebase-functions. I'll respond back when it is released which should be relatively soon. Thanks!

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