This set of documents describes the Google-Built OpenTelemetry Collector and explains how to deploy the Collector to collect OpenTelemetry Protocol (OTLP) traces, metrics, and logs from instrumented applications and export that data to Google Cloud Observability and other backends.
The Google-Built OpenTelemetry Collector is an open-source, production-ready build of the upstream OpenTelemetry Collector that is built with upstream OpenTelemetry Collector components. OpenTelemetry, which is part of the Cloud Native Computing Foundation, provides open source APIs, libraries, and SDKs to collect distributed traces, metrics, and logs for application monitoring.
The Google-Built OpenTelemetry Collector lets you send correlated OTLP traces, metrics, and logs to Google Cloud Observability and other backends from applications instrumented by using OpenTelemetry SDKs. The Collector also captures metadata for Google Cloud resources, so you can correlate application performance data with infrastructure telemetry data. Using the Google-built Collector with Google Cloud Observability provides insights to improve the performance of your applications and infrastructure. For more information about the Collector, see Description of the Google-Built OpenTelemetry Collector.
Use the Google-Built OpenTelemetry CollectorYou can use the Google-built Collector to collect telemetry data from your applications running on Kubernetes (including Google Kubernetes Engine), Container-Optimized OS, or standalone containers. The documents in this section describe how to configure and deploy the Google-built Collector in the following environments:
If you don't have an application ready to use the Collector, then you can deploy the OpenTelemetry demo with the Google-built Collector. For more information, see Try the OpenTelemetry demo.
For information about using OpenTelemetry instrumentation to generate traces, metrics, and logs from your applications, see the following documents:
The Google-Built OpenTelemetry Collector is built by using upstream OpenTelemetry components and tooling, while being built and retrieved entirely from Google build-test-release infrastructure (Artifact Registry). The Google-built Collector is compatible with an OpenTelemetry Collector build from the upstream repository. It is also hosted as a Docker image for flexible deployment on any container-based system, including Kubernetes and GKE.
The Google-built Collector provides a Google-curated package with the components most users will need for a rich observability experience on Google Cloud. You don't need to select components and manually build your own Collector. By using the Google-built Collector, you can:
OpenTelemetry maintains a list of best practices for configuring the OpenTelemetry Collector and for scaling the Collector. This section makes some additional recommendations.
Use the health-check extensionThe health-check extension enables an HTTP URL that can be probed to check the status of the OpenTelemetry Collector. Using this extension provides the following benefits:
On Kubernetes and GKE, the health-check extension is compatible with Kubernetes liveness and readiness probes. For information about setting up these probes, see Kubernetes best practices: Setting up health checks with readiness and liveness probes.
On Cloud Run, a single health-check extension can serve as the endpoint for both startup and liveness probes in your Cloud Run service configuration.
Use the batch processorThe batch processor collects traces, metrics, or logs and bundles them into batches for transmission. Using the batch processor provides the following benefits:
googlesecretmanager
provider
The googlesecretmanager
provider lets you store sensitive information needed by configuration files in Secret Manager, a service designed specifically for securely storing, accessing, and managing sensitive data. Using the googlesecretmanager
provider offers the following benefits:
For information about using this provider, see Manage secrets in Collector configuration.
Release notesThe Google-Built OpenTelemetry Collector is versioned in sync with the upstream OpenTelemetry Collector. The current version is v0.131.0; the corresponding Docker image, stored in Artifact Registry, is us-docker.pkg.dev/cloud-ops-agents-artifacts/google-cloud-opentelemetry-collector/otelcol-google:0.131.0. For each new version, the changes that are most relevant to Google Cloud users are included on this page.
0.131.0:
0.130.0:
0.129.0:
0.128.0:
0.127.0:
0.126.0:
metricstarttime
googlesecretmanager
. For information about using this provider to eliminate plaintext secrets in your Collector configuration, see Manage secrets in Collector configuration.0.124.1:
dockerstats
, jmx
, redis
, statsd
, syslog
metricsgeneration
0.122.1:
googleclientauthextension
0.121.0:
For all Google-Built OpenTelemetry Collector client-side issues, including feature requests, bug reports, and general questions, open an issue in the appropriate GitHub repository. These repositories are monitored by Google, and issues are triaged and addressed on a best-effort basis.
Google-Built OpenTelemetry Collector packaging repository, for issues related to the following:
OpenTelemetry Collector Contrib repository, for issues related to the following:
googlecloudexporter
googlemanagedprometheusexporter
googleclientauthextension
resourcedetectionprocessor
For issues related to the Google-Built OpenTelemetry Collector's use of Google Cloud Observability services and APIs, like server errors or quotas, contact Cloud Customer Care.
PricingThere is no charge for deploying and using the Google-Built OpenTelemetry Collector.
When you send telemetry data to Google Cloud, you are billed by ingestion volume. For information about costs associated with the ingestion of traces, logs, and Google Cloud Managed Service for Prometheus metrics, see Google Cloud Observability pricing.
Try the OpenTelemetry demoThis section describes how to deploy and run the OpenTelemetry demo for Google Cloud with the Google-Built OpenTelemetry Collector.
This section is optional. If you are ready to integrate the Google-built Collector into your own deployments, see the following documents:
The OpenTelemetry demo requires a Kubernetes cluster that has Workload Identity Federation configured. For information about setting up Workload Identity Federation for the OpenTelemetry demo, see Workload Identity prerequisites.
Update the demo to use the Google-built CollectorBy default, the OpenTelemetry demo uses the upstream OpenTelemetry Collector. To use the Google-Built OpenTelemetry Collector instead, do the following:
Clone the OpenTelemetry demo repository:
git clone https://github.com/GoogleCloudPlatform/opentelemetry-demo.git
Go to the kubernetes
directory.
cd kubernetes
Edit the file opentelemetry-demo.yaml
to replace the line for the Collector image to use. The line looks like the following, although the version might be different:
image: "otel/opentelemetry-collector-contrib:0.108.0"
Replace the value of the image:
field with us-docker.pkg.dev/cloud-ops-agents-artifacts/google-cloud-opentelemetry-collector/otelcol-google:0.131.0
, so that the line looks like the following, and then save the file:
image: "us-docker.pkg.dev/cloud-ops-agents-artifacts/google-cloud-opentelemetry-collector/otelcol-google:0.131.0"
Deploy the demo by applying the updated opentelemetry-demo.yaml
file:
kubectl apply --namespace otel-demo -f opentelemetry-demo.yamlConnect to the demo
After you have applied the updated configuration, you can forward the data to a local port. For example, to connect to the demo at localhost:8080
, issue the following command:
kubectl port-forward --n otel-demo svc/opentelemetry-demo-frontendproxy 8080:8080
You can then use your browser to connect to the demo at localhost:8080
.
The OpenTelemetry demo sends metrics, traces, and logs to Google Cloud by using the Google-Built OpenTelemetry Collector. For information about the specific telemetry sent by the demo, see Seeing telemetry in the documentation for the demo.
View your metricsThe Google-Built OpenTelemetry Collector collects Prometheus metrics that you can view by using the Metrics Explorer. The metrics collected depend on the instrumentation of the app, although the Google-built Collector also writes some self-metrics.
To view the metrics collected by the Google-Built OpenTelemetry Collector, do the following:
In the Google Cloud console, go to the leaderboard Metrics explorer page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
Prometheus Target
in the filter bar, and then use the submenus to select a specific resource type and metric:
prometheus.googleapis.com
.When the measurements for a metric are cumulative, Metrics Explorer automatically normalizes the measured data by the alignment period, which results in the chart displaying a rate. For more information, see Kinds, types, and conversions.
When integer or double values are measured, such as with counter
metrics, Metrics Explorer automatically sums all time series. To change this behavior, set the first menu of the Aggregation entry to None.
For more information about configuring a chart, see Select metrics when using Metrics Explorer.
To view your trace data, do the following:
In the Google Cloud console, go to the Trace explorer page:
You can also find this page by using the search bar.
In the Gantt chart on the Trace details panel, select a span.
A panel opens that displays information about the traced request. These details include the method, status code, number of bytes, and the user agent of the caller.
To view the logs associated with this trace, select the Logs & Events tab.
The tab shows individual logs. To view the details of the log entry, expand the log entry. You can also click View Logs and view the log by using the Logs Explorer.
For more information about using the Cloud Trace explorer, see Find and explore traces.
View your logsFrom the Logs Explorer, you can inspect your logs, and you can also view associated traces, when they exist.
In the Google Cloud console, go to the Logs Explorer page:
If you use the search bar to find this page, then select the result whose subheading is Logging.
Locate a log entry from your instrumented app. To view the details, expand the log entry.
Click Traces on a log entry with a trace message, and then select View trace details.
A Trace details panel opens and displays the selected trace.
For more information about using the Logs Explorer, see View logs by using the Logs Explorer.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4