Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (2023)

Historically, cloud developers have had limited visibility into the impact of code changes. Profiling non-production deployments does not provide useful results, and profiling tools used in production tend to be expensive with a performance impact that means they can only be used in the short term and on a small portion of the overall code base. Bad code can add latency and slow down an application without anyone noticing.Stackdriver Profiler, part of the Google Cloud Stackdriver monitoring and logging tool, allows you to understand the performance impact of your code, right down to every function call - without sacrificing speed. We've added new language and platform support to profiles, along with weighted filtering and other new filters.

Profiles launched for public betalast spring and has been critical when it comes to cost optimization for many developers usingGoogle Cloud Platform(GCP). In particular, we've heard from customers that they like the continuous visibility into the execution of their code and the cost and performance improvements they get when Profiler is deployed. We've heard from several business users that they've achieved double-digit computing savings with just over an hour of analysis with Profiler. Others have discovered sources of slow memory leaks that they were previously unable to identify.

Game developer Outfit7has already achieved success with Stackdriver Profiler: "Using Stackdriver Profiler, the back-end team at Outfit7 was able to analyze the memory usage pattern of our java batch jobs running in App Engine Standard, identify bottlenecks and fix them, reducing the number of OOMs" from a few a day to almost zero,' says Anže Sodja, senior software engineer at Outfit7 Group (a subsidiary of Ekipa2). applications directly in the cloud without creating a local test environment."

New features and support are now available for Profiler

Since the beta release, we've made Stackdriver Profiler even better by adding support for more runtimes and platforms, and by adding powerful new analytics features. That includes:

(Video) Debugging in production with Stackdriver Debugger

  • Support for Node.js, Python (coming soon) and App Engine Standard Java
  • Worst case performance analysis
  • Identification of common functions that have a high overall impact

Stackdriver Profiler launched with support for Java CPU profiling and Go CPU and heap profiling. Since then, we've added instrumentation for Node.js, Python, and the App Engine Standard Java runtime. Here's a quick overview of the available environments:

Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (1)
Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (2)

Getting started with Profiler is incredibly easy; At most you will need to add the library to your application and reinstall. You can find setup guides for all languages ​​and platformsin the Profiler documentation.

If you have Java code implemented on App Engine Standard, getting started with Profiler is even easier. Simply enable it in your appengine web.xml or app.yaml file, then click Stackdriver Profiler in the Cloud Console to see how your code is running in production.

Worst-case performance analysis with Profiler

Many workloads can be characterized as bursts or spikes of high resource consumption and poor performance. Stackdriver Profiler's new weighted filtering feature lets you find out what's causing these spikes, so you can smooth them out and improve your users' experience with your applications.

Understanding the average resource usage of your code is incredibly useful during development or when trying to reduce computer usage. However, it's not that useful when you're trying to improve performance. This is where Profiler's weighted filtering feature comes in.

By applying a weight filter, you can instruct Stackdriver Profiler to analyze only the telemetry that was captured when your application was consuming the largest amount of resources. For example, if you select "Top 10% Weight" when checking CPU time, Profiler will only analyze data recorded from periods when CPU usage was in the top 10%. The remaining 90% of data that was recorded when CPU usage was relatively lower will be ignored. This is what it looks like:

(Video) Cloud OnAir: Make your applications fast and reliable with Stackdriver APM

Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (3)
Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (4)

Identification of highly aggregated influence functions

In addition, Stackdriver Profiler now includes a list of all features recorded in the profile, along with their total total cost. The flame graph currently presented by Profiler allows you to quickly discover resource-intensive functions called from a single path of code. However, it is less useful for identifying suboptimal function calls in your code that affect overall performance.

In the example below, we use this new feature list to identify a commonly called logging process that is consuming 50% of the service's CPU. The impact of this feature was not necessarily apparent by looking at the flame graph alone.

Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (5)
Stackdriver Profiler adds more languages ​​and new analysis features | Google Cloud Blog (6)

To open this list, click the magnifying glass button to the left of the filter bar, as shown above. This will apply a focus filter to the selected feature.

Exploring filters in Profiles

In addition to the difficulty filter, there are other filters in Profiler that allow you to see details about your code to find problems.


(Video) PC 03 : Uncovering Google Cloud & Devops Secrets with @TechTutorialswithPiyush

In addition to using the feature list, you can access the focus filter view by typing "Focus" in the filter bar or from the tooltip that appears when you mouse over a feature in the flame graph. Focus scrolls the flame graph to show all code paths flowing to and from the focused function, along with their relative resource usage. It's great for visualizing the impact of a commonly called function or for understanding how a particular piece of code is called.

Show stacks

A stack refers to a vertical set of functions on a flame graph that represents the path of calls through the codebase.

The Show Stacks filter presents a similar view to Focus, with a few key differences. While Focus combines all instances of a selected function to show code paths entering and exiting it, Show Stacks simply filters the view to remove stacks that do not contain the selected function. This is useful when you want to keep separate instances of a particular feature and don't want to change the structure of the flame graph.

Hide stacks

This filter is similar to Show Stacks, except that it removes the stacks that match the specified function name. Hide stacks is often useful for hiding information about uninteresting threads in wall profiles in Java programs. For example, it is quite common to add the filter "Hide Strings: Unsafe.park".

View from the frame

(Video) Stackdriver with Rory Petty: GCPPodcast 179

Like the focus filter, this combines all instances of the selected feature and displays the total set of paths exiting that feature. Unlike Focus, it doesn't show the code paths leading to the function.

Unlike Focus, it can also match multiple features, and all matching features will be displayed as the roots of the flame graph. This filter is useful for focusing on a subset of features (for example, a particular library) to dive into its performance aspects. For example, adding "Show from box: com.example.common.stringutil" can be a useful way to limit the view to string utilities used throughout the codebase.

Hide frames

This filter removes features that match the specified name. It is commonly used to hide non-essential beam frames, such as using "Hide frames: java.util" to underline application code on a flame graph.


The marking filter allows you to quickly identify the location of a specific feature on the flame graph without changing the graph itself. Think of it as Ctrl+F for function names in the profile.


(Video) Stackdriver Diagnostics Tools with Sharat Shroff and Morgan McLean: GCPPodcast 35

As mentioned earlier, this filter allows you to analyze only profiles recorded when the selected resource (CPU, heap, etc.) was at peak usage.

Tell us what you think about Profiler

We're excited to make Stackdriver Profiler more useful for more developers, and we have some big announcements coming soon. Until then, send your feedback via our ongoing user survey (you'll see a notification at the bottom of the screen when you open Profile) or other channels. And consider getting ProfilerQuick startorkodelabstart.
Published in
  • Management tools
  • Google Cloud


What does Google Cloud Profiler do? ›

Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications.

What is Stackdriver Profiler? ›

Stackdriver Profiler collects data via lightweight sampling-based instrumentation that runs across all of your application's instances. It then displays this data on a flame chart, presenting the selected metric (CPU time, wall time, RAM used, contention, etc.)

How do I enable GCP Profiler? ›

Enable the Profiler API
  1. Go to the APIs & Services dashboard: Go to APIs & services.
  2. Click the Add APIs and Services button.
  3. Search for Profiler API.
  4. In the search results, select Cloud Profiler API.
  5. If API enabled is displayed, then the API is already enabled. If not, click the Enable button.

What is GCP stack? ›

Stackdriver provides a centralized method of receiving signals, logs, metrics, and traces from your GCP resources, so you can quickly see when there is any alert on your cloud. Stackdriver is a freemium offering from Google and has native support for other Google products on GCP like BigQuery, CloudStorage, and more.

What is the difference between Google Cloud Trace and profiler? ›

Error Reporting, Cloud Trace and Cloud Profiler. Error Reporting counts, analyzes and aggregates crashes in running cloud services, while Cloud Trace provides a view of requests as they flow through microservices and Cloud Profiler shows how microservices consume CPU, memory and threads.

What is the difference between GCP trace and profiler? ›

Cloud Trace provides latency sampling and reporting for App Engine, including per-URL statistics and latency distributions. Cloud Profiler provides continuous profiling of resource consumption in your production applications, helping you identify and eliminate potential performance issues.

What are the benefits of Stackdriver? ›

Stackdriver ingests that data and generates insights via dashboards, charts, and alerts. Metrics help you understand how your applications and system services are performing. Stackdriver defines over a thousand metric types that help you monitor GCP, AWS, and third-party software.

What is the purpose of Stackdriver trace? ›

The Stackdriver Trace service collects and stores latency data from your application and displays it in the Google Cloud Platform Console, giving you detailed near-real-time insight into application performance.

What is Stackdriver based on? ›

It is based on collectd, an open source daemon that gathers system and application performance data. Users receive customizable alerts when Cloud Monitoring discovers performance issues. It can also monitor Google Compute Engine (GCE) and EC2 VMs.

How to enable Stackdriver in GCP? ›

Enabling the API
  1. In the Google Cloud console, select the Google Cloud project for which you want to enable the API, and then go to the APIs & Services page: ...
  2. Click the Enable APIs and Service button.
  3. Search for "Monitoring".
  4. In the search results, click through to "Stackdriver Monitoring API".

How do I enable Stackdriver logging in GCP? ›

Enabling Logging
  1. In the Google Cloud console, go to the Kubernetes Engine > Kubernetes clusters page: Go to Kubernetes clusters.
  2. Click Create cluster.
  3. Configure the cluster as needed.
  4. Click Advanced options. In the Additional features section, enable Enable Stackdriver Logging service.
  5. Click Create.

How do you add secrets in GCP? ›

To create a secret and store a string as the contents of the first secret version:
  1. $ echo -n "my super secret data" | gcloud secrets create my-secret \ --replication-policy=" replication-policy " \ --data-file=-
  2. $ gcloud secrets versions access 1 --secret=" my-secret "

Is Stackdriver deprecated? ›

Unfortunately, StackDriver has been renamed as Google's Operations suite, and the Debugger has been deprecated.

What is Stackdriver API in GCP? ›

The Stackdriver Monitoring API gives you access to over 900 Stackdriver Monitoring metrics from Google Cloud Platform and Amazon Web Services. You can create your own custom metrics and can organize your cloud resources using groups.

How to check Stackdriver logs in GCP? ›

Stackdriver logs
  1. In the Google Cloud Platform Console, go to Stackdriver > Logging > Logs.
  2. Select your existing project at the top of the page.
  3. Use the drop-down lists to select Google Assistant Action as the resource to see food ordering logs. You can filter the logs by timestamp or search by keyword.
Mar 14, 2023

What is the difference between GCP and Google Drive? ›

Is Google Drive the same as Google Cloud Platform? No. Even though they are cloud storage solutions, Google Drive is not a platform. It's a solution for individual users and thus has different features than Google Cloud.

What is the difference between snapshot and image in GCP? ›

A machine image can be used to backup multiple disks at a time. A persistent disk snapshot can only backup a single disk at a time.

What is Google profiling? ›

Profiling is a form of dynamic code analysis. You capture characteristics of the application as it runs, and then you use this information to identify how to make your application faster and more efficient. Historically, profiling was performed only during application development.

Which is the best data visualization tools in GCP? ›

Best Google BigQuery Data Visualization Tools for 2023
  • 1) Hevo Data.
  • 2) Tableau.
  • 3) Google Data Studio.
  • 4) Looker.
  • 5) Holistics.
  • 6) Power BI.
  • 7) QlikView.
Jan 10, 2023

What is the difference between IAM and ACL in GCP? ›

Uniform bucket-level access is part of IAM but ACL is not

To allow for granular permission settings at an object-level, ACL was introduced uniquely to GCS. This means that IAM features like roles and service accounts can be used for uniform bucket-level access, but these cannot be used for ACL.

What is the difference between GCP data prep and data fusion? ›

Cloud Data Fusion offers the ability to create ETL jobs using their graphical pipeline UI representation whereas Dataproc lets us run previously created Spark/Hadoop/Hive jobs.

What is the difference between GCP Stackdriver and Prometheus? ›

Prometheus belongs to "Monitoring Tools" category of the tech stack, while Stackdriver can be primarily classified under "Cloud Monitoring". Some of the features offered by Prometheus are: a multi-dimensional data model (timeseries defined by metric name and set of key/value dimensions)

What is the difference between GCP Stackdriver and Splunk? ›

Customers use Splunk to search, monitor, analyze and visualize machine data. On the other hand, Stackdriver is detailed as "Monitoring, logging, and diagnostics for applications on Google Cloud Platform and AWS". Google Stackdriver provides powerful monitoring, logging, and diagnostics.

What is the use of Stackdriver transparent SLI? ›

Stackdriver then introspects your project and creates a list of metrics that you can chart based on the products and services you are using. You can then pick the metrics that make the most sense for your environment. You can narrow down the data you display by specifying which project or service you want to monitor.

What is the new name for Stackdriver? ›

In the year 2020, Google Cloud Platform did make an announcement upon rebranding Stackdriver monitoring and the logging platform into Google Operations Platform. Google acquired Stackdriver monitoring and logging platform in 2014 and rebranded it in the year 2020.

What is the difference between cloud monitoring and cloud logging? ›

Monitoring helps you manage application performance, while logging is all about managing the data inside logs.

What are the three types of networks offered in the Google Cloud? ›

Google network infrastructure consists of three main types of networks:
  • Data center network, which connects all the machines in the network together.
  • Software-based private network WAN connects all data centers together.
  • Software defined public WAN for user-facing traffic entering the Google network.
Oct 29, 2021

What can Stackdriver monitor resources on? ›

Stackdriver Monitoring:

Stackdriver ingests that data and generates insights via the dashboard, the chart to monitor and see the graphical representation of the resources used in Google Compute Engine VMs and Amazon EC2 instances.

Is it possible to integrate Stackdriver with dataflow? ›

One of the easier ways to profile a Dataflow pipeline is to leverage the native integration that Dataflow has with Stackdriver Profiler. Stackdriver Profiler visualizes the call hierarchy and resource consumption of the pipeline in an interactive flame graph that can be used to analyze performance.

What prefix is applied to Google Maps API metric types in Stackdriver monitoring? ›

The "metric type" strings in this table must be prefixed with .

What is the difference between Stackdriver and cloud monitoring? ›

Cloud Logging allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud and Amazon Web Services. Stackdriver Logging provides detailed list of logs, current log volume and projected monthly volume. This makes it easy to see which logs have the highest volume.

How long is log data stored in Stackdriver logging in GCP? ›

Cloud Logging retains the logs in the _Default bucket for 30 days, unless you configure custom retention for the bucket. You can't delete the _Default bucket. Cloud Logging pricing applies to the logs data held in the _Default bucket.

How do I enable Stackdriver? ›

Enabling Monitoring
  1. In the Google Cloud console, go to the Kubernetes Engine > Kubernetes clusters page: Go to Kubernetes clusters.
  2. Click Create cluster.
  3. Configure the cluster as needed.
  4. Click Advanced options. Ensure that Enable Stackdriver Monitoring service is selected.
  5. Click Create.

What is Stackdriver logging agent? ›

Google Stackdriver is a very good product for monitoring and logging your compute instances on Google Cloud, AWS, Azure, Alibaba, etc. This article covers Stackdriver logging for Google Compute instances running Debian 9.

How should a customer reliably deliver Stackdriver logs from GCP to their on premises SIEM system? ›

How should a customer reliably deliver Stackdriver logs from GCP to their on-premises SIEM system? A. Send all logs to the SIEM system via an existing protocol such as syslog.

How do I enable multi factor authentication in GCP? ›

Enabling multi-factor authentication

Go to the Identity Platform MFA page in the Google Cloud console. In the box titled SMS-Based Multi-Factor Authentication, click Enable.

How to add SSH keys in GCP? ›

To add a public SSH key to instance metadata using the Google Cloud console, do the following:
  1. In the Google Cloud console, go to the VM instances page. ...
  2. Click the name of the VM that you want to add an SSH key for.
  3. Click Edit.
  4. Under SSH Keys, click Add item.
  5. Add your public key into the text box. ...
  6. Click Save.

How do I get the secret key in GCP? ›

To generate Access Key and Secret Key, you should go to your project's storage page. In the left sidebar of the dashboard, click Google Cloud Storage and then Settings. Select the Interoperability tab. If you haven't enabled it already, click on Interoperable Access.

How do I list custom roles in GCP? ›

Get the role metadata

You can view the metadata using the Google Cloud console or the IAM API. In the Google Cloud console, go to the Roles page. Select your organization or project from the drop-down list at the top of the page. Select the checkbox for one or more roles to view the role permissions.

What is Stackdriver in AWS? ›

About Stackdriver

Stackdriver Intelligent Monitoring includes several breakthrough features, such as Rapid Stack Discovery, Stack Scanner, Elastic Monitoring, and AWS Insights.

Which two types of data can you view in the monitoring API? ›

The Monitoring API uses filters to select metrics, to fetch time-series data, and to collect monitored resources into groups.

Is cloud debugger deprecated? ›

Cloud Debugger is scheduled for shutdown on May 31, 2023. To help with your debugging needs after this shutdown, we've built an open source CLI tool, Snapshot debugger.

What do Stackdriver transparent service level indicators Slis do? ›

The Stackdriver SLI metrics provide request latency, request count, request sizes and response sizes for GCP service calls. These SLI metrics cover the latency, traffic, error and saturation metrics described by the SRE book.

Which Google ML API is used to Analyse sentiment in a text? ›

To perform sentiment analysis, use the gcloud CLI and use the --content flag to identify the content to analyze: gcloud ml language analyze-sentiment --content="Enjoy your vacation!"

How do I check my Google API usage? ›

The simplest way to view your API metrics is to use the Google Cloud console's API Dashboard. You can see an overview of all your API usage, or you can drill down to your usage of a specific API. To see an overview of your API usage: Visit Cloud console's APIs and Services section.

What is the difference between Logging and error reporting in Stackdriver? ›

Logging lets you read and write log entries, search and filter your logs, export your logs, and create logs-based metrics. Stackdriver Error Reporting aggregates and displays errors produced in your running cloud services.

What are the three main types of roles in Google Cloud Platform? ›

Role types
  • Basic roles, which include the Owner, Editor, and Viewer roles that existed prior to the introduction of IAM.
  • Predefined roles, which provide granular access for a specific service and are managed by Google Cloud.
  • Custom roles, which provide granular access according to a user-specified list of permissions.

What is the monitoring tool in Google Cloud? ›

Cloud Monitoring collects metrics, events, and metadata from Google Cloud, Amazon Web Services (AWS), hosted uptime probes, and application instrumentation. Using the BindPlane service, you can also collect this data from over 150 common application components, on-premise systems, and hybrid cloud systems.

What is the use of Android profiler? ›

The Memory Profiler is a component in the Android Profiler that helps you identify memory leaks and memory churn that can lead to stutter, freezes, and even app crashes. It shows a realtime graph of your app's memory use and lets you capture a heap dump, force garbage collections, and track memory allocations.

How to do Google profiling? ›

Update your profile
  1. From the main menu, click Profile.
  2. Click Edit Profile.
  3. Choose an option: Select the communities you want to show on your profile page. Click Camera. to change your profile. Click Information. to change your personal information.
  4. Click Save.

Why do I need a Google profile? ›

A Google Business Profile is best suited to companies that operate physically instead of purely online. A Google Business Profile will help you appear in Google Maps results, increasing visibility and assisting local customers in finding your services.

How can I improve my Google profile? ›

Update your business info for better visibility
  1. Enter complete data. Local results favour the most relevant results for each search. ...
  2. Verify your locations. ...
  3. Keep your hours accurate. ...
  4. Manage & respond to reviews. ...
  5. Add photos. ...
  6. Add in-store products. ...
  7. Relevance. ...
  8. Distance.

What are Google Cloud functions examples? ›

One example is to trigger log analysis. In this scenario, a function might look for specific events -- such as an error -- within other cloud services or applications, trigger a check of log files and send desired log entries to specific administrators or developers through a notification service.

What is the most powerful role in GCP? ›

Basic roles (formerly named primitive roles) are legacy roles that predated the existence of Cloud IAM. They are the most powerful roles available in a project, with thousands of permissions, and are managed by Google on your behalf.

Where should you use stack driver to monitor resources? ›

Stackdriver Monitoring. Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch, and many others.

Is Google Analytics a monitoring tool? ›

Google Analytics Tool is an analytical tool that is used for web traffic monitoring and analysis. It is a stable product that Google offers as a free version and a premium version.

What is the best practice for Google Cloud monitoring? ›

Best practice rules for GCP Cloud Logging
  • Enable Logs Router Encryption with Customer-Managed Keys. ...
  • Enable Monitoring for Audit Configuration Changes. ...
  • Enable Monitoring for Bucket Permission Changes. ...
  • Enable Monitoring for Custom Role Changes. ...
  • Enable Monitoring for Firewall Rule Changes.

What is profiling tool used for? ›

You can use profiling tools to identify which portions of the program are executed most frequently or where most of the time is spent. Profiling tools are typically used after a basic tool, such as the vmstat or iostat commands, shows that a CPU bottleneck is causing a performance problem.

What does a data profiler do? ›

Data profiling is the process of examining, analyzing, and creating useful summaries of data. The process yields a high-level overview which aids in the discovery of data quality issues, risks, and overall trends. Data profiling produces critical insights into data that companies can then leverage to their advantage.

What is the function of profiling tool? ›

In software engineering, a profiler is a tool used to help you analyze the performance of your applications to improve poorly performing code. Profiling and diagnostics tools help you diagnose memory and CPU usage and other application-level issues.


1. Episode 10: The podcast no longer requires credit cards
(The Cloud Pod)
2. Improving Reliability with Error Budgets, Metrics, and Tracing in Stackdriver (Cloud Next '18)
(Google Cloud Tech)
3. DevOps 201 for Application Developers (Cloud Next '18)
(Google Cloud Tech)
4. Build Fail to Success: Practical CI/CD with GCP
(Maven Wave)
5. Cloud OnAir: What's new in BigQuery
(Google Cloud Tech)
6. Webinar: A Recap of the Cloud Observability Platform in 2019


Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated: 12/07/2023

Views: 6011

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.