// appengine is an example of starting cloud.google.com/go/profiler on
// App Engine.
package main
import (
"cloud.google.com/go/profiler"
)
func main() {
// Profiler initialization, best done as early as possible.
if err := profiler.Start(profiler.Config{
// Service and ServiceVersion can be automatically inferred when running
// on App Engine.
// ProjectID must be set if not running on GCP.
// ProjectID: "my-project",
}); err != nil {
// TODO: Handle error.
}
}