Skip to content

GoogleCloudPlatform/opentelemetry-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

781 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTelemetry Demo with Google Cloud

This repository contains deployment configuration and instructions for deploying the upstream OpenTelemetry Demo configured to work with Google Cloud Observability products (Cloud Monitoring, Cloud Logging, and Cloud Trace).

This is not an officially supported Google product.

Repository Overview

This repository does not contain the source code for the microservices. It is used to deploy the OpenTelemetry Astronomy Shop (using upstream images) and configure GCP integrations.

Running on GKE

The recommended way to run the demo on GKE is with the official Helm chart via Helmfile.

GKE Managed OpenTelemetry Prerequisites

You must enable Managed OpenTelemetry on your GKE cluster.

For a new GKE Autopilot cluster:

gcloud beta container clusters create-auto CLUSTER_NAME \
    --project=PROJECT_ID \
    --managed-otel-scope=COLLECTION_AND_INSTRUMENTATION_COMPONENTS \
    --location=LOCATION

For a new GKE Standard cluster:

gcloud beta container clusters create CLUSTER_NAME \
    --project=PROJECT_ID \
    --managed-otel-scope=COLLECTION_AND_INSTRUMENTATION_COMPONENTS \
    --location=LOCATION

Or update an existing cluster:

gcloud beta container clusters update CLUSTER_NAME \
    --project=PROJECT_ID \
    --managed-otel-scope=COLLECTION_AND_INSTRUMENTATION_COMPONENTS \
    --location=LOCATION

Replace CLUSTER_NAME, PROJECT_ID, and LOCATION with your cluster's details.

Note: The cluster version must be 1.34.1-gke.2178000 or later.

Deploying with Helmfile

Make sure you have the following installed:

Ensure you have either configured or disabled Workload Identity in your cluster.

helmfile --interactive apply -f gcp/helmfile.yaml

Cleaning up

To clean up, run:

helmfile --interactive destroy -f gcp/helmfile.yaml

(Alternative) Using kubectl apply

Installing with the Helm chart is recommended, but you can also use kubectl apply to install the manifests directly.

First, make sure you have followed the Workload Identity setup steps above.

Install the manifests:

kubectl apply -n otel-demo -f ./kubernetes/opentelemetry-demo.yaml

Seeing Telemetry

With the demo running, you should see telemetry automatically created by the demo's load generator. You can see metrics under "Prometheus Target" in Cloud Monitoring:

metrics

Traces in the Trace explorer:

traces

And logs in the Logs explorer organized by service:

logs

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors