Set up GCP Trace observability
Prepare your Google Cloud project
- Create a Google Cloud project if you do not have one
- Enable the Cloud Trace API in your project
- Verify that the environment where your agent runs has credentials with permission to write traces (the
Cloud Trace Agentrole)
- Running on Google Cloud
- Running locally or elsewhere
If running on Cloud Run, GKE, or Compute Engine, the default service account typically has the required permissions if scopes are configured.
Create an observability configuration
- On the Idun Agent Platform main page, navigate to Observability
- Click Add configuration
- Select GCP Trace
- Enter a Configuration Name (for example, “GCP Trace Prod”)
- Fill in the required details:
- Project ID: Your Google Cloud Project ID (for example,
my-project-123) - Region: (Optional) Specific region if applicable
- Trace Name: (Optional) Name for the trace session
- Sampling Rate: A number between 0.0 and 1.0 (for example,
1.0for 100% sampling) - Flush Interval: Time in seconds to wait before sending traces (default
5) - Ignore URLs: (Optional) Paths to exclude from tracing
- Project ID: Your Google Cloud Project ID (for example,
- Click Create configuration
Attach GCP Trace to your agent
- Navigate to the agent you want to trace
- Click Edit Agent
- Click Next to reach the observability configuration step
- Select GCP Trace as the observability provider
- Select the configuration you created
- Click Next
- Click Save changes to finalize
View trace data
Once your agent is running with observability enabled:- Interact with your agent
- Open the Google Cloud Console
- Navigate to Trace > Trace List
Best practices
- Adjust sampling rate: For high-traffic agents, lower the sampling rate to reduce costs and noise
- Use meaningful trace names: This helps when filtering traces in the GCP Console
Troubleshooting
Traces not showing up?
- Check API: Verify the Cloud Trace API is enabled in your project
- Check permissions: Confirm the agent’s service account has the
Cloud Trace Agentrole - Wait for flush: Traces are sent in batches. Wait a few seconds (based on your flush interval) after execution before checking the console