This document describes how to run the Google-Built OpenTelemetry Collector on Google Kubernetes Engine to collect OTLP logs, metrics, and traces from instrumented applications and then export that data to Google Cloud.
Before you begin
Running the Google-Built OpenTelemetry Collector requires the following resources:
A Google Cloud project with the Cloud Monitoring API, Cloud Trace API, and Cloud Logging API enabled.
If you don't have a Google Cloud project, then do the following:
In the Google Cloud console, go to New Project:
In the Project Name field, enter a name for your project and then click Create.
Go to Billing:
Select the project you just created if it isn't already selected at the top of the page.
You are prompted to choose an existing payment profile or to create a new one.
The Monitoring API, Trace API, and Logging API are enabled by default for new projects.
If you already have a Google Cloud project, then ensure that the Monitoring API, Trace API, and Logging API are enabled:
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles.
A Kubernetes cluster. If you don't have a Kubernetes cluster, then follow the instructions in the Quickstart for GKE.
The following command-line tools:
gcloud
kubectl
The
gcloud
andkubectl
tools are part of the Google Cloud CLI. For information about installing them, see