Cloud Functions

Browse deployed Cloud Functions, invoke HTTP functions, and view execution metrics.

Overview

The Cloud Functions interface displays all deployed Cloud Functions in your Firebase project. View function details, invoke HTTP-triggered functions directly, and monitor execution metrics — all from a single interface.

Prerequisites

Stackpane uses the Cloud Functions API v2 and the Cloud Build API to power this feature. Both must be enabled in your Google Cloud project.

gcloud services enable cloudfunctions.googleapis.com cloudbuild.googleapis.com --project YOUR_PROJECT_ID
  • Required IAM roles: Cloud Functions Viewer (roles/cloudfunctions.viewer) for viewing, or Cloud Functions Admin (roles/cloudfunctions.admin) for invoke and delete operations
  • Cost notes: Cloud Functions requires the Blaze plan. You are billed for invocations, compute time (GB-seconds), and networking. The free tier includes 2 million invocations/month, 400K GB-seconds, and 200K GHz-seconds. Cloud Build charges for build minutes beyond the free 120 minutes/day. Invoking functions through Stackpane counts as regular invocations.

Common Errors

“Insufficient permissions for Cloud Functions”: Your account needs the Cloud Functions Admin role (roles/cloudfunctions.admin) to perform management operations beyond viewing. For invoke-only access, roles/cloudfunctions.invoker is sufficient. Ensure both the Cloud Functions API and Cloud Build API are enabled.

Function Browser

Navigate to Cloud Functions from the sidebar. Functions load automatically and display in a sortable table:

  • Name — the function name
  • State — current deployment state with a color-coded badge
  • Trigger — HTTP or Event trigger type
  • Runtime — the runtime environment (e.g., Node.js 18, Python 3.11)
  • Region — the deployment region (e.g., us-central1)
  • Generation — v1 or v2 Cloud Functions

Click column headers to sort. Click Refresh to reload the function list.

Function States

Functions display state badges with the following colors:

  • Active (green) — function is deployed and serving requests
  • Deploying (yellow) — function is currently being deployed
  • Failed (red) — deployment failed with an error
  • Deleting (orange) — function is being removed

Function Inspector

Click a function to open the detail inspector panel with complete information:

Configuration

  • Runtime — the execution environment
  • Entry point — the exported function name
  • Available memory — memory allocated to each instance
  • Timeout — maximum execution time before the function is terminated
  • Max instances — the maximum number of concurrent instances

Trigger Details

  • HTTP functions — shows the function URL that accepts HTTP requests
  • Event functions — shows the event type (e.g., Firestore write, Auth user create) and the resource path

Environment Variables

Key-value pairs of environment variables configured for the function, displayed in monospaced font for readability.

Labels

Tag-style display of all function labels, useful for organizing and categorizing functions.

Timestamps

  • Created — when the function was first deployed
  • Last updated — when the function was most recently deployed

Invoking Functions

Sending a Request

  1. Select an HTTP-triggered function in the function browser.
  2. Click Invoke Function in the inspector.
  3. The function URL is displayed (read-only).
  4. Choose the HTTP method: GET or POST.
  5. For POST requests, enter a JSON body in the editor.
  6. Click Send to execute the request.

Viewing the Response

After invoking, the response panel shows:

  • Status code — with a color-coded badge (2xx green, 4xx yellow, 5xx red)
  • Response time — latency in milliseconds
  • Response body — pretty-printed response content

This provides a quick way to test functions during development without reaching for tools like curl or Postman.

Function Metrics

The inspector’s metrics section shows execution data from Cloud Monitoring for the last 24 hours:

Execution Count

Total number of function invocations, formatted with K/M suffixes for large numbers.

Error Rate

Percentage of failed executions. The indicator is color-coded:

  • Green — error rate is 5% or below
  • Red — error rate exceeds 5%

Average Latency

Mean response time across all executions, formatted as milliseconds or seconds.

Executions Over Time

A bar chart showing hourly execution distribution over the last 24 hours. This helps you identify traffic patterns, peak usage times, and unusual spikes.

Function Actions

From the inspector, you can:

  • Invoke Function — send an HTTP request to HTTP-triggered functions
  • Delete Function — remove the function from the project (with a confirmation dialog)

Tips

  • Use the state badges to quickly identify functions that are deploying or have failed
  • Check environment variables to verify configuration values without accessing the GCP Console
  • Use POST with a JSON body to test functions that expect structured input
  • Check the error rate after deployments to catch issues early
  • Navigate to Cloud Logging from a function to see detailed logs for debugging