I tried using the following code but it doesn't seem to be sending data to GCP Profiler
import * as profiler from "@google-cloud/profiler";
if (process.env.NODE_ENV === "production") {
profiler.start();
}
...
I just see this screen when I visit the profiler:
I read here that it supports:
Supported environments:
- Compute Engine
- Google Kubernetes Engine (GKE)
- App Engine flexible environment
- App Engine standard environment
- Outside of Google Cloud (For information on the additional configuration requirements, see Profiling applications running outside of Google Cloud.)
Do I need to do additional configuration to use Google Cloud Profiler on Google Cloud Run?