[go: up one dir, main page]

Upload profile data to Stackdriver service

A detailed issue on the subject exists at gitlab-com/gl-infra/scalability#101. Though we'll track the progress for Labkit here.

The goal is extending the monitoring module to support cloud.google.com/go/profiler bindings with the following plan:

  1. Add a call to profiler.Start from the monitoring initializer. Nodes can then be initialized using an environment variable such as GITLAB_CONTINUOUS_PROFILING=stackdriver?project_id=bamboo-project-606 which would enable the profiling optionally
  2. Roll the change out to Labkit users (Gitaly, Workhorse, Praefect, etc)
  3. We can then start testing in staging by adding the GITLAB_CONTINUOUS_PROFILING environment variable on some nodes.

Interesting information can be found at https://medium.com/google-cloud/continuous-profiling-of-go-programs-96d4416af77b.

Calling Start will start a goroutine to collect profiles and upload to the profiler server, at the rhythm specified by the server.

Edited by Oswaldo Ferreira