--- id: google-cloud-profiler version: "4.1.0" license: Apache License, Version 2.0 license_treatment: permissive maintenance: active --- # google-cloud-profiler — Google Cloud Profiler Python Agent License: permissive · Maintenance: active · Downloads: 419.2K/mo ## What it is and what it does Google Cloud Profiler Python Agent is a daemon-based profiler that continuously collects CPU, memory, and wall-time profiles from running Python applications and uploads them to Google Cloud Profiler for centralized analysis. It integrates directly into your application startup with a single initialization call and runs as a background thread, requiring minimal code changes. The package is designed for production workloads on Google Cloud Platform but can work in other environments by specifying a project_id. It has a native compiled component, making installation platform-dependent: Linux systems with glibc or musl are supported, and Alpine Linux requires additional build tools. The profiler supports Python versions from 3.7 through 3.11 and is actively maintained by Google Cloud Platform. Use it for: - Identify CPU hotspots and memory leaks in production Python services running on GCP without manual profiling. - Continuously monitor application performance across multiple instances and correlate profiles with service versions. - Debug performance regressions by comparing profiles across different service versions over time. - Analyze resource consumption in containerized Python applications deployed on Google Cloud Run or GKE. - Troubleshoot latency issues in long-running batch jobs or background workers on Compute Engine. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Collects and uploads CPU, memory, and wall-time profiles from Python applications running on Google Cloud Platform to Google Cloud Profiler for analysis and visualization. Yes, if you run Python applications on Google Cloud Platform and need production profiling. The active maintenance, permissive license, and zero known vulnerabilities support adoption. However, the high install friction (native compilation, Linux-only, Alpine special handling) and Python version ceiling (3.11 max) mean it's not suitable for all environments. Verify your deployment platform and Python version before committing. ## Install pip install google-cloud-profiler uv add google-cloud-profiler poetry add google-cloud-profiler ## Installing google-cloud-profiler Before you install: High install friction due to native compilation requirements. The package includes compiled components and requires build tools on Linux systems; Alpine Linux users must explicitly install build-base. Maintenance is active with recent commits, though the latest release was over a year ago. License in practice: Licensed under Apache License, Version 2.0 (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you include a copy of the license and note any changes made. Quickstart: pip install google-cloud-profiler import googlecloudprofiler googlecloudprofiler.start( service='my-service', service_version='1.0.0', verbose=2 ) Linux only (glibc or musl). Requires Python >= 3.7 and <= 3.11. Native compilation needed at install time; Alpine Linux requires build-base package. GCP credentials or project_id parameter required for operation. Verify before relying: - Whether the package works on Python 3.12 or later despite classifier support ending at 3.11 - Current performance overhead of the daemon thread during continuous profiling - Compatibility with non-GCP environments beyond the project_id workaround ## Package facts - License: Apache License, Version 2.0 (permissive) - Python support: unspecified - Install friction: high - Maintenance: active - Downloads: 419.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python profiling agent gcp, google cloud profiler python, cpu memory profiling cloud, application performance profiling, continuous profiling python, cloud profiler integration, python performance monitoring gcp, gcp-native, performance-profiling, production-monitoring [View on SkillFed](https://skillfed.io/packages/google-cloud-profiler) · [View on PyPI](https://pypi.org/project/google-cloud-profiler/)