Firebase Functions
Set up Google Cloud IAM roles to manage Cloud Functions from Opseer.
Last updated: 2026-05-09
Firebase Cloud Functions management requires additional Google Cloud IAM roles beyond the standard Firebase service account. This guide walks you through the setup.
You must have Firebase already connected to your project before setting up Cloud Functions. See the Firebase integration guide.
Why additional setup?
Firebase Admin SDK does not include Cloud Functions management. Opseer uses the Google Cloud Functions API v2 and Cloud Logging API directly, which require explicit IAM permissions on your service account.
Step 1: Enable Cloud Functions API
Open Google Cloud Console
Go to console.cloud.google.com and select your Firebase project.
Navigate to APIs & Services
In the left sidebar, click "APIs & Services" > "Enabled APIs & Services".
Search for Cloud Functions API
Click "+ Enable APIs and Services" and search for "Cloud Functions API".
Enable it
Click "Enable". Wait a minute for the change to propagate.
If you see an "API not enabled" error in Opseer, clicking the provided link will take you directly to the enable page.
Step 2: Add IAM roles
Your Firebase service account needs three IAM roles to use all Cloud Functions features in Opseer:
- Cloud Functions Viewer — View function list and details
- Logs Viewer — View function execution logs
- Monitoring Viewer — View function metrics (coming soon)
How to add roles
Open IAM page
Go to console.cloud.google.com/iam-admin/iam and select your project.
Find your service account
Look for the row with email like [email protected]
Click the edit (pencil) icon
On the right side of the service account row.
Click "Add another role"
Do NOT modify existing roles. Click the "Add another role" button.
Search and add "Cloud Functions Viewer"
Type "Cloud Functions Viewer" in the search box and select it.
Add "Logs Viewer"
Click "Add another role" again and search for "Logs Viewer".
Add "Monitoring Viewer"
Click "Add another role" again and search for "Monitoring Viewer".
Save
Click "Save" to apply the changes. It may take 1-2 minutes to propagate.
Do not remove existing roles (like "Firebase Admin SDK Administrator Service Agent"). Only add the new roles.
Step 3: Verify in Opseer
Go to Firebase > Functions
In your project sidebar, expand Firebase and click Functions.
Check the function list
If IAM roles are correctly configured, you'll see your deployed Cloud Functions listed with their status, runtime, and region.
Select a function
Click a function to view its details and execution logs in the terminal.
Available features
- View all deployed Cloud Functions (name, status, runtime, region, trigger type)
- View function details (memory, timeout, environment variables, HTTP URL)
- Monitor execution logs in real-time (auto-refresh every 5 seconds)
- Filter logs by severity (INFO, WARNING, ERROR, DEBUG)
- Invoke HTTP functions directly from the dashboard (test purpose)
- Delete functions (owner/admin only)
Troubleshooting
"Cloud Functions API is not enabled"
The Cloud Functions API needs to be enabled in Google Cloud Console. Click the provided button in the error message to go directly to the enable page.
"IAM permission required"
Your service account is missing required IAM roles. Follow Step 2 above to add Cloud Functions Viewer, Logs Viewer, and Monitoring Viewer roles.
"No log entries found"
This means the function hasn't been invoked recently. Logs are only generated when a function executes. Try invoking the function and checking again.