- Enable billing in your GCP project.
- Enable the Cloud Metrics and Cloud Trace APIs.
- Ensure that your user GCP user has (at minimum)
roles/cloudtrace.agent. You can learn about metric-related and trace-related IAM in the GCP documentation.
- Obtain credentials.
gcloud auth application-default login
You can run the collector as a service account, as long as it has the necessary roles. This is useful in production, because credentials for a user are short-lived.
You can also run the collector on a GCE VM or as a GKE workload, which will use the service account associated with GCE/GKE.
The Google Cloud Project ID to send logs, metrics, and traces to.
The method used for authenticating to Google Cloud. 'auto' will attempt to use the collector's environment, useful when running on Google Cloud or when you have set GOOGLE_APPLICATION_CREDENTIALS in the collector's environment. 'json' takes the json contents of a Google Service Account's credentials file. 'file' is the file path to a Google Service Account credential file.
JSON value from a Google Service Account credential file.
Path to a Google Service Account credential file on the collector system. The collector's runtime user must have permission to read this file.
Updated about 2 months ago